Menu.addEntry

Add an item to the menu.

  1. auto addEntry(string label, CommandCallback callback, string shortCutText)
    class Menu
    addEntry
    (
    this T
    )
    (
    string label
    ,,
    string shortCutText = null
    )
  2. auto addEntry(Image image, string label, CommandCallback callback, string imagePosition, string shortCutText)

Parameters

label string

The label of the item.

callback CommandCallback

The callback to execute when this item is selected in the menu.

shortCutText string

The keyboard shortcut text. This is for decoration only, you must also bind this keypress to an event.

Return Value

Type: auto

This widget to aid method chaining.

Callback Arguments

These are the fields within the callback's CommandArgs parameter which are populated by this method when the callback is executed.

$(PARAM_TABLE $(PARAM_ROW CommandArgs.element, The menu that executed the callback.) $(PARAM_ROW CommandArgs.uniqueData, The label of the menu entry which was selected.) $(PARAM_ROW CommandArgs.callback, The callback which was executed.) )

See Also

Meta