[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eCollapseControl is a customizable control that allows users to collapse and expand content within Google Chat apps and Google Workspace Add-ons (in developer preview).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can customize the appearance and behavior of the CollapseControl using methods to set collapse and expand buttons, as well as horizontal alignment.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetCollapseButton\u003c/code\u003e and \u003ccode\u003esetExpandButton\u003c/code\u003e methods allow for assigning custom buttons to control the expansion and collapse actions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetHorizontalAlign\u003c/code\u003e method enables developers to control the horizontal positioning of the CollapseControl within its container.\u003c/p\u003e\n"]]],[],null,["CollapseControl\n\nA customizable collapse and expand control.\n\nAvailable for Google Chat apps. In developer preview for Google Workspace add-ons.\n\n\n| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.\n\n\u003cbr /\u003e\n\n```javascript\nconst collapseButton =\n CardService.newTextButton()\n .setTextButtonStyle(CardService.TextButtonStyle.BORDERLESS)\n .setText('Collapse');\n\nconst expandButton =\n CardService.newImageButton()\n .setImageButtonStyle(CardService.ImageButtonStyle.FILLED);\n\nconst collapseControl =\n CardService.newCollapseControl()\n .setHorizontalAlign(CardService.HorizontalAlignment.END)\n .setExpandButton(expandButton)\n .setCollapseButton(collapseButton);\n``` \n\nMethods\n\n| Method | Return type | Brief description |\n|-------------------------------------------------------------------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------|\n| [setCollapseButton(button)](#setCollapseButton(Button)) | [CollapseControl](#) | Sets the [Button](/apps-script/reference/card-service/button) that is displayed for \"show less\" button. |\n| [setExpandButton(button)](#setExpandButton(Button)) | [CollapseControl](#) | Sets the [Button](/apps-script/reference/card-service/button) that is displayed for \"show more\" button. |\n| [setHorizontalAlign(horizontalAlignment)](#setHorizontalAlign(HorizontalAlignment)) | [CollapseControl](#) | Sets the [HorizontalAlignment](/apps-script/reference/card-service/horizontal-alignment) of the [CollapseControl](#). |\n\nDetailed documentation \n\n`set``Collapse``Button(button)` \nSets the [Button](/apps-script/reference/card-service/button) that is displayed for \"show less\" button. Optional. \n\nMust be set together with collapse button.\n\n```javascript\nconst collapseButton =\n CardService.newTextButton().setText('Collapse');\n\nconst collapseControl =\n CardService.newCollapseControl()\n .setCollapseButton(collapseButton);\n```\n\nParameters\n\n| Name | Type | Description |\n|----------|------------------------------------------------------|-----------------------------|\n| `button` | [Button](/apps-script/reference/card-service/button) | The collapse button to set. |\n\nReturn\n\n\n[CollapseControl](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Expand``Button(button)` \nSets the [Button](/apps-script/reference/card-service/button) that is displayed for \"show more\" button. Optional. \n\nMust be set together with collapse button.\n\n```javascript\nconst expandButton =\n CardService.newTextButton().setText('Expand');\n\nconst collapseControl =\n CardService.newCollapseControl()\n .setExpandButton(expandButton);\n```\n\nParameters\n\n| Name | Type | Description |\n|----------|------------------------------------------------------|---------------------------|\n| `button` | [Button](/apps-script/reference/card-service/button) | The expand button to set. |\n\nReturn\n\n\n[CollapseControl](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Horizontal``Align(horizontalAlignment)` \nSets the [HorizontalAlignment](/apps-script/reference/card-service/horizontal-alignment) of the [CollapseControl](#). Optional. \\*\n\n```javascript\nconst collapseControl = CardService.newCollapseControl().setHorizontalAlign(\n CardService.HorizontalAlignment.START,\n);\n```\n\nParameters\n\n| Name | Type | Description |\n|-------------------------|---------------------------------------------------------------------------------|---------------------------------------------------------|\n| `horizontal``Alignment` | [HorizontalAlignment](/apps-script/reference/card-service/horizontal-alignment) | The horizontal alignment of the CollapseControl widget. |\n\nReturn\n\n\n[CollapseControl](#) --- This object, for chaining."]]