MenuItem - Kirix Documentation

Developer Resources

MenuItem

Overview

The MenuItem class represents items on a menu.

Constructor

MenuItem()
MenuItem(label : String, help : String)

Arguments

label
The text that appears on the menu item.
help
The help string associated with the item.

Events

MenuItem.click
Fired when the menu item is clicked.

Methods

MenuItem.getHelpString
Returns the help string associated with the menu item.
MenuItem.getLabel
Returns the text of the menu item.
MenuItem.setEnabled
Enables or disables a menu item.
MenuItem.setHelpString
Sets the help string for the menu item.
MenuItem.setLabel
Sets the label for a menu item.

MenuItem.getHelpString

function MenuItem.getHelpString() : String

Returns

The help string associated with the menu item.

Description

Returns the help string associated with the menu item.

MenuItem.getLabel

function MenuItem.getLabel() : String

Returns

The text of the menu item.

Description

Returns the text of the menu item.

MenuItem.setEnabled

function MenuItem.setEnabled()
function MenuItem.setEnabled(enabled : Boolean)

Arguments

enabled
A flag which determines whether a menu item is enabled or not.

Description

Enables or disables a menu item. If enabled isn't specified, the menu item is enabled; otherwise the menu item is enabled if enabled is true and disabled if enabled is false.

MenuItem.setHelpString

function MenuItem.setHelpString(help : String)

Arguments

help
The help string associated with the menu item.

Description

Sets the menu item help string specified by help.

MenuItem.setLabel

function MenuItem.setLabel(label : String)

Arguments

label
The new text for the menu item.

Description

Sets the menu item text, specified by label.