The Menuitem class is the template for creating menu items. Its hierarchy is depicted in Figure 9.1.
The attribute of the Baselistitem class is given in Table 9.2, those of the Textlistitem class in Table 9.3, and that of the Menuitem class in Table 9.4. The Listitem class does not add new attributes. The Basecomponent and Basevaluecomponent classes are discussed in Chapter 2.
Name | Usage | Type | Default | Accessibility |
---|---|---|---|---|
onselected | Tag and JS | expression | null | read-write |
Description. The event that is raised when this item is selected. |
Name | Usage | Type | Default | Accessibility |
---|---|---|---|---|
text_x | Tag and JS | number | 4 | read-write |
Description. The x position of the displayed text. | ||||
text_y | Tag and JS | number | read-write | |
Description. The y position of the text label. |
Name | Usage | Type | Default | Accessibility |
---|---|---|---|---|
command | Tag and JS | expression | null | read-write |
Description. The command object to be executed when this menuitem is selected. |
You usually add an event handler to the selected event. This event handler is executed when the menu item is selected. You’ll see how to achieve this in the next section.