Class CollapseControl

CollapseControl

אפשרות להתאמה אישית של כפתור הצגה והסתרה.

זמין באפליקציות שפועלות עם Google Chat. בתצוגה מקדימה למפתחים של תוספים ל-Google Workspace.

const collapseButton =
    CardService.newTextButton()
        .setTextButtonStyle(CardService.TextButtonStyle.BORDERLESS)
        .setText('Collapse');

const expandButton =
    CardService.newImageButton()
        .setImageButtonStyle(CardService.ImageButtonStyle.FILLED);

const collapseControl =
    CardService.newCollapseControl()
        .setHorizontalAlign(CardService.HorizontalAlignment.END)
        .setExpandButton(expandButton)
        .setCollapseButton(collapseButton);

Methods

שיטהסוג הערך שמוחזרתיאור קצר
setCollapseButton(button)CollapseControlמגדיר את Button שמוצג בכפתור 'הצגת פחות'.
setExpandButton(button)CollapseControlמגדיר את Button שמוצג בכפתור 'הצגת מידע נוסף'.
setHorizontalAlign(horizontalAlignment)CollapseControlמגדירה את HorizontalAlignment של CollapseControl.

תיעוד מפורט

setCollapseButton(button)

מגדיר את Button שמוצג בכפתור 'הצגת פחות'. אופציונלי.
חובה להגדיר יחד עם לחצן הכיווץ.

const collapseButton =
    CardService.newTextButton().setText('Collapse');

const collapseControl =
    CardService.newCollapseControl()
        .setCollapseButton(collapseButton);

פרמטרים

שםסוגתיאור
buttonButtonכפתור הכיווץ להגדרה.

חזרה

CollapseControl – האובייקט הזה, לשרשור.


setExpandButton(button)

מגדיר את Button שמוצג בכפתור 'הצגת מידע נוסף'. אופציונלי.
חובה להגדיר יחד עם לחצן הכיווץ.

const expandButton =
    CardService.newTextButton().setText('Expand');

const collapseControl =
    CardService.newCollapseControl()
        .setExpandButton(expandButton);

פרמטרים

שםסוגתיאור
buttonButtonכפתור ההרחבה להגדרה.

חזרה

CollapseControl – האובייקט הזה, לשרשור.


setHorizontalAlign(horizontalAlignment)

מגדירה את HorizontalAlignment של CollapseControl. אופציונלי. *

const collapseControl = CardService.newCollapseControl().setHorizontalAlign(
    CardService.HorizontalAlignment.START,
);

פרמטרים

שםסוגתיאור
horizontalAlignmentHorizontalAlignmentהיישור האופקי של הווידג'ט CollapseControl.

חזרה

CollapseControl – האובייקט הזה, לשרשור.