A RibbonMenuItem control defines a menu item for the application menu (RibbonApplicationMenu) or the ribbon menu (RibbonMenu) in the RibbonBar control. There are three types of menu items:
-
Normal(0) -- Can be inserted as the master menu item to the application menu or as the menu item to the ribbon menu.
-
Separator(1) -- Can be inserted as a separator to the master menu in the application menu or to the menu in the ribbon menu. A separator is a horizontal line used to visually distinguish between groups of menu items.
-
Recent(2) -- Can be inserted as the recent menu item to the application menu.
The RibbonMenuItem control is the child object of the RibbonApplicationMenu control and the RibbonMenu control. For the hierarchical structure of the ribbon item controls and how to get and set them, refer to the section called “Accessing the RibbonBar items via PowerScripts” in Users Guide.
This control has no events. But you can create user events and bind them with this control. You can create the Clicked user event and the Selected user event. For how to create the Clicked user event, see Clicked in PowerScript Reference; for how to create the Selected user event, see Selected in PowerScript Reference.
RibbonMenuItem property |
Datatype |
Description |
---|---|---|
ClassDefinition |
PowerObject |
An object of type PowerObject containing information about the class definition of the object or control. |
Boolean |
Specifies whether the control is checked. |
|
String |
Specifies the name of the clicked user event to be bound with the menu item. |
|
Boolean |
Specifies whether the menu item is enabled (can be clicked). |
|
Integer |
Specifies the type of the menu item. This property (called Type attribute in XML/JSON) cannot be changed at runtime. |
|
String |
The unique identifier of the ribbon item (including RibbonCategoryItem, RibbonSmallButtonItem, RibbonLargeButtonItem, and RibbonMenuItem) that is converted from the menu item. NoteThis property is valid only when the ribbon item is converted from the menu (when DisplayMenuAsRibbonBar is enabled). The standalone ribbon item control does not support this property. |
|
String |
Specifies the file name of the picture. The picture will not show if the menu item is added to the recent menu. |
|
RightToLeft |
Boolean |
Unsupported. |
String |
Specifies the name of the selected user event to be bound with the menu item. |
|
String |
Specifies the shortcut key for the menu item. |
|
String |
Specifies the tag value assigned to the menu item. |
|
String |
Specifies the text that displays in the menu item. The user can assign an accelerator key by typing an ampersand (&) before the letter in the menu item text. For example, &File designates the F in File as an accelerator key. The user can also assign shortcut keys to the menu item by the Shortcut property. |
|
Boolean |
Specifies whether the menu item is visible. Values are: TRUE -- Control is visible. FALSE -- Control is not visible. |
RibbonMenuItem function |
Datatype returned |
Description |
---|---|---|
String |
Returns the name assigned to the control. |
|
Integer |
Creates a reference to a context-specific instance of the specified service. |
|
PowerObject |
Returns a reference to the name of the parent object. |
|
Boolean |
Adds the specified event to the end of the event queue for the specified object |
|
Integer |
Triggers a specified event in the control and executes the script for the event. |
|
Object |
Returns the type of the control. |