Stay organized with collections
Save and categorize content based on your preferences.
blockly > CollapsibleToolboxCategory > setExpanded
Opens or closes the current category and the associated flyout.
Signature:
setExpanded(isExpanded: boolean): void;
Parameters
Parameter |
Type |
Description |
isExpanded |
boolean |
True to expand the category, false to close. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esetExpanded()\u003c/code\u003e method controls the visibility of a CollapsibleToolboxCategory and its corresponding flyout.\u003c/p\u003e\n"],["\u003cp\u003eIt takes a boolean argument, \u003ccode\u003eisExpanded\u003c/code\u003e, to determine whether the category should be expanded (true) or collapsed (false).\u003c/p\u003e\n"],["\u003cp\u003eCalling this method with \u003ccode\u003etrue\u003c/code\u003e opens the category and its flyout, while calling it with \u003ccode\u003efalse\u003c/code\u003e closes them.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [CollapsibleToolboxCategory](./blockly.collapsibletoolboxcategory_class.md) \\\u003e [setExpanded](./blockly.collapsibletoolboxcategory_class.setexpanded_1_method.md)\n\nCollapsibleToolboxCategory.setExpanded() method\n-----------------------------------------------\n\nOpens or closes the current category and the associated flyout.\n\n**Signature:** \n\n setExpanded(isExpanded: boolean): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|------------|---------|----------------------------------------------|\n| isExpanded | boolean | True to expand the category, false to close. |\n\n**Returns:**\n\nvoid"]]