पसंद के मुताबिक छोटा और बड़ा किया जा सकने वाला कंट्रोल.
यह सुविधा, 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);
तरीके
तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
---|---|---|
set | Collapse | "कम दिखाएं" बटन के लिए दिखाया जाने वाला Button सेट करता है. |
set | Collapse | "ज़्यादा दिखाएं" बटन के लिए दिखाया जाने वाला Button सेट करता है. |
set | Collapse | Collapse का Horizontal सेट करता है. |
ज़्यादा जानकारी वाला दस्तावेज़
setCollapseButton(button)
"कम दिखाएं" बटन के लिए दिखाया जाने वाला Button
सेट करता है. ज़रूरी नहीं.
इसे 'छोटा करें' बटन के साथ सेट किया जाना चाहिए.
const collapseButton = CardService.newTextButton().setText('Collapse'); const collapseControl = CardService.newCollapseControl() .setCollapseButton(collapseButton);
पैरामीटर
नाम | टाइप | ब्यौरा |
---|---|---|
button | Button | सेट करने के लिए, छोटा करें बटन. |
वापसी का टिकट
Collapse
— चेन करने के लिए यह ऑब्जेक्ट.
setExpandButton(button)
"ज़्यादा दिखाएं" बटन के लिए दिखाया जाने वाला Button
सेट करता है. ज़रूरी नहीं.
इसे 'छोटा करें' बटन के साथ सेट किया जाना चाहिए.
const expandButton = CardService.newTextButton().setText('Expand'); const collapseControl = CardService.newCollapseControl() .setExpandButton(expandButton);
पैरामीटर
नाम | टाइप | ब्यौरा |
---|---|---|
button | Button | सेट करने के लिए, बड़ा करें बटन. |
वापसी का टिकट
Collapse
— चेन करने के लिए यह ऑब्जेक्ट.
setHorizontalAlign(horizontalAlignment)
Collapse
का Horizontal
सेट करता है. ज़रूरी नहीं. *
const collapseControl = CardService.newCollapseControl().setHorizontalAlign( CardService.HorizontalAlignment.START, );
पैरामीटर
नाम | टाइप | ब्यौरा |
---|---|---|
horizontal | Horizontal | CollapseControl विजेट का हॉरिज़ॉन्टल अलाइनमेंट. |
वापसी का टिकट
Collapse
— चेन करने के लिए यह ऑब्जेक्ट.