blockly > Toolbox > selectItem_
Selects the given item, marks it selected, and updates aria state.
Signature:
protected selectItem_(oldItem: ISelectableToolboxItem | null, newItem: ISelectableToolboxItem): void;
Parameters
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.
[null,null,["Last updated 2024-09-18 UTC."],[[["`Toolbox.selectItem_()` is a protected method used for managing the selection state within a Blockly toolbox."],["It takes two arguments: `oldItem` representing the previously selected item and `newItem` representing the item to be selected."],["This method updates the visual and accessibility states of the toolbox by marking the `newItem` as selected and updating ARIA attributes accordingly."],["The method does not return any value (void)."]]],["The `selectItem_` method within the Toolbox class is used to manage the selection of items within a toolbox. It takes two parameters: `oldItem`, representing the previously selected item (or null), and `newItem`, the item now being selected. The method's actions involve marking `newItem` as selected and updating its associated ARIA (Accessible Rich Internet Applications) state. This method returns no values (void).\n"]]