blockly > FieldDropdown > onItemSelected_
Metoda FieldDropdown.onItemSelected_()
Zaznacz element w menu.
Podpis:
protected onItemSelected_(menu: Menu, menuItem: MenuItem): void;
Parametry
Parametr |
Typ |
Opis |
menu |
Menu |
Kliknięto komponent Menu. |
menuItem |
MenuItem |
Element MenuItem wybrany w menu. |
Zwroty:
nieważne
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-09-09 UTC.
[null,null,["Ostatnia aktualizacja: 2024-09-09 UTC."],[[["The `onItemSelected_` method is called when a user selects an item from a FieldDropdown's menu."],["It receives the `Menu` and selected `MenuItem` as input, allowing developers to react to the user's choice."],["This method is intended for internal use and doesn't return any value."]]],["The `onItemSelected_` method within the `FieldDropdown` class handles dropdown menu item selection. It receives two parameters: `menu`, representing the clicked `Menu` component, and `menuItem`, representing the selected `MenuItem` within that menu. This method processes the specific `MenuItem` choice and performs actions based on the selection within a `FieldDropdown`, it does not return a value.\n"]]