class fwt::MenuItem

sys::Obj
  fwt::Widget
    fwt::MenuItem

@Js
@Serializable

Source

MenuItem is an individual item on a Menu.

accelerator

Key? accelerator

Source

Accelerator for menu item.

command

Command? command

Source

Command associated with this menu item. Setting the command automatically maps the text, icon, enable state, and eventing to the command.

image

Image? image

Source

Image to display on menu item. Defaults to null.

make

new make(|This|? f := null)

Source

Default constructor.

makeCommand

new makeCommand(Command c)

Source

Make a menu item for the specified command.

mode

const MenuItemMode mode := ...

Source

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

EventListeners onAction()

Source

Callback function when menu is selected.

Event id fired:

Event fields:

  • none
selected

Bool selected

Source

The button's selection state (if check or radio). Defaults to false.

text

Str text

Source

Text of the menu item's label. Defaults to "".