אפשרות להתאמה אישית של כפתור הצגה והסתרה.
זמין באפליקציות שפועלות עם 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
| שיטה | סוג הערך שמוחזר | תיאור קצר |
|---|---|---|
set | Collapse | מגדיר את Button שמוצג בכפתור 'הצגת פחות'. |
set | Collapse | מגדיר את Button שמוצג בכפתור 'הצגת מידע נוסף'. |
set | Collapse | מגדירה את Horizontal של Collapse. |
תיעוד מפורט
setCollapseButton(button)
מגדיר את Button שמוצג בכפתור 'הצגת פחות'. אופציונלי.
חובה להגדיר יחד עם לחצן הכיווץ.
const collapseButton = CardService.newTextButton().setText('Collapse'); const collapseControl = CardService.newCollapseControl() .setCollapseButton(collapseButton);
פרמטרים
| שם | סוג | תיאור |
|---|---|---|
button | Button | כפתור הכיווץ להגדרה. |
חזרה
CollapseControl – האובייקט הזה, לשרשור.
setExpandButton(button)
מגדיר את Button שמוצג בכפתור 'הצגת מידע נוסף'. אופציונלי.
חובה להגדיר יחד עם לחצן הכיווץ.
const expandButton = CardService.newTextButton().setText('Expand'); const collapseControl = CardService.newCollapseControl() .setExpandButton(expandButton);
פרמטרים
| שם | סוג | תיאור |
|---|---|---|
button | Button | כפתור ההרחבה להגדרה. |
חזרה
CollapseControl – האובייקט הזה, לשרשור.
setHorizontalAlign(horizontalAlignment)
מגדירה את HorizontalAlignment של CollapseControl. אופציונלי. *
const collapseControl = CardService.newCollapseControl().setHorizontalAlign( CardService.HorizontalAlignment.START, );
פרמטרים
| שם | סוג | תיאור |
|---|---|---|
horizontal | Horizontal | היישור האופקי של הווידג'ט CollapseControl. |
חזרה
CollapseControl – האובייקט הזה, לשרשור.