blockly > FieldDropdown > onItemSelected_
Metodo FieldDropdown.onItemSelected_()
Gestisci la selezione di un elemento nel menu a discesa.
Firma:
protected onItemSelected_(menu: Menu, menuItem: MenuItem): void;
Parametri
Parametro |
Tipo |
Descrizione |
menù |
Menu |
Hai fatto clic sul componente Menu. |
menuItem |
MenuItem |
La voce di menu selezionata nel menu. |
Resi:
null
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-09-10 UTC.
[null,null,["Ultimo aggiornamento 2024-09-10 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"]]