調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
ブロックする >FieldDropdown >onItemSelected_
FieldDropdown.onItemSelected_() メソッド
プルダウン メニューでのアイテムの選択を処理します。
署名:
protected onItemSelected_(menu: Menu, menuItem: MenuItem): void;
パラメータ
パラメータ |
型 |
説明 |
メニュー |
メニュー |
Menu コンポーネントがクリックされました。 |
menuItem |
MenuItem |
メニュー内で選択された MenuItem。 |
戻り値:
void
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-10 UTC。
[null,null,["最終更新日 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"]]