MenuItem object
The MenuItem widget represents a selectable command within a menu
| Event | Description |
|---|---|
| MenuItem:onClick() | Event fired when the user clicks on the MenuItem |
| Property | Description | Access | Type |
|---|---|---|---|
| MenuItem.checked | Get/set the checked state of the MenuItem | readwrite | boolean |
| MenuItem.enabled | Get/set the enabled state of the MenuItem | readwrite | boolean |
| MenuItem.index | Get/set the MenuItem position in its Menu | readwrite | number |
| MenuItem.submenu | Get/set the submenu of the MenuItem | readwrite | |
| MenuItem.text | Get/set the MenuItem caption | readwrite | string |
| Methods | Description | Return value |
|---|---|---|
| MenuItem:loadicon() | Set the MenuItem icon | boolean |
| MenuItem:remove() | Remove the MenuItem from its Menu | - |