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);

तरीके

तरीकारिटर्न टाइपसंक्षिप्त विवरण
setCollapseButton(button)CollapseControlयह कुकी, "कम दिखाएं" बटन के लिए दिखने वाला Button सेट करती है.
setExpandButton(button)CollapseControlइस कुकी का इस्तेमाल, "ज़्यादा दिखाएं" बटन के लिए दिखने वाले Button को सेट करने के लिए किया जाता है.
setHorizontalAlign(horizontalAlignment)CollapseControlइस विकल्प से, CollapseControl के HorizontalAlignment को सेट किया जाता है.

ज़्यादा जानकारी वाला दस्तावेज़

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)

इस विकल्प से, CollapseControl के HorizontalAlignment को सेट किया जाता है. ज़रूरी नहीं. *

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

पैरामीटर

नामटाइपब्यौरा
horizontalAlignmentHorizontalAlignmentCollapseControl विजेट का हॉरिज़ॉन्टल अलाइनमेंट.

वापसी का टिकट

CollapseControl — यह ऑब्जेक्ट, चेनिंग के लिए है.