-
Notifications
You must be signed in to change notification settings - Fork 26
MenuItem
Alessandro Febretti edited this page Nov 17, 2015
·
5 revisions
Represents an item in a menu.
Method(s) | Description |
---|---|
string getText() , setText(string)
|
Gets or sets the label for the menu item |
string getDescription() , setDescription(string)
|
Gets or sets the description for the menu item |
string getCommand() , setCommand(string)
|
Gets or sets the script command to be executed when the menu item is activated or changed |
bool isChecked() , setChecked(bool value)
|
Gets or sets the checked status for checkbox menu items |
string getUserTag() , setUserTag(string value)
|
Gets or sets a string user tag associated to this menu item |
Menu getSubMenu() |
Returns the sub menu attached to this menu item. Valid only for MenuItem.SubMenu item types. See Menu
|
Widget getWidget() |
Returns the a reference to the Widget representing this menu item. |
Slider getSlider() |
Returns a reference to a Slider widget if this menu item is a slider. Returns None otherwise |
Image getImage() |
Returns a reference to an Image widget if this menu item is an image. Returns None otherwise |
Container getContainer() |
Returns a reference to a Container widget if this menu item is a container. Returns None otherwise |
Button getButton() |
Returns a reference to a Button widget if this menu item is a button. Returns None otherwise |
setImage(PixelData image) |
Sets the image for this menu item. Image and Button menu items support images. See PixelData. |
(v10.1) setVisible(bool visible) , bool isVisible()
|
Gets or sets the visibility of this menu item. Invisible menu items are removed from the menu. |