Stay organized with collections
Save and categorize content based on your preferences.
blockly > ToolboxCategory > setSelected
Sets the current category as selected.
Signature:
setSelected(isSelected: boolean): void;
Parameters
Parameter |
Type |
Description |
isSelected |
boolean |
True if this category is selected, false otherwise. |
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."],[[["The `setSelected()` method is used to mark a ToolboxCategory as selected or unselected within a Blockly workspace."],["It accepts a boolean argument, `isSelected`, indicating the desired selection state (true for selected, false for unselected)."],["Calling this method visually highlights the category in the toolbox to indicate its active status to the user."]]],["The `setSelected` method within the `ToolboxCategory` class designates a category as selected or deselected. It accepts a boolean parameter, `isSelected`. When `isSelected` is set to `true`, the category becomes selected. Setting it to `false` deselects the category. This method's return type is void, meaning it doesn't return any value. The method modifies the selection status of the designated toolbox category.\n"]]