研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >ToolboxCategory >setSelected
将当前类别设置为选中状态。
Signature:
setSelected(isSelected: boolean): void;
参数
参数 |
类型 |
说明 |
isSelected |
布尔值 |
如果选择了此类别,则返回 true,否则返回 false。 |
返回:
void
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-16。
[null,null,["最后更新时间 (UTC):2024-10-16。"],[[["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"]]