
MenuItem is an individual item on a Menu.
Slots
- command
-
Command command
Command associated with this menu item. Setting the command automatically maps the text, icon, enable state, and eventing to the command.
-
static internal Str getSelectedId := "getSelected"
- image
-
Image image := null
Image to display on menu item. Defaults to null.
-
static internal Str imageId := "image"
- mode
-
const MenuItemMode mode := Menu) ? fwt::MenuItemMode.menu : fwt::MenuItemMode.push
Mode defines the menu item's style. Normal items are one of check, push, radio, or sep. The default is push. All instances of
Menu
have a mode of menu. This field cannot be changed once the item is constructed. - onAction
-
|Event| onAction
Callback function when menu is selected.
- selected
-
Bool selected
The button's selection state (if check or radio)
-
static internal Str setSelectedId := "setSelected"
- text
-
Str text := ""
Text of the menu item's label. Defaults to "".
-
static internal Str textId := "text"