BBjMenuItem
Description
The BBjMenuItem object provides methods for manipulating a GUI menu item control.
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjMenuBar > BBjMenu > BBjMenuItem
A BBjMenuItem object is created through the following BBjMenu methods:
Return Value |
Method |
---|---|
BBjMenuItem |
addMenuItem(int ID, string title) |
BBjMenuItem |
addMenuItem(int ID, string title, boolean checkable, boolean checked) |
BBjMenuItem |
insertMenuItem(int index, int ID, string title) |
BBjMenuItem |
insertMenuItem(int index, int ID, string title, boolean checkable, boolean checked) |
Note:
If the "checkable" boolean parameter is true, addMenuItem and insertMenuItem will return a BBjCheckableMenuItem.
Methods of BBjMenuItem
Return Value |
Method |
---|---|
void |
|
void |
|
void |
|
void |
setAccelerator(string accel) |
void |
|
void |
setImageSize(int width, int height) |
Methods of BBjMenuItem inherited from BBjControl
Events
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
---|---|---|---|
ON_MENU_ITEM_SELECT |
C |
Remarks
All ID values should be negative. If they are not given as negative, they will be changed to negative internally.
All index values are zero-based.
BBjMenuBar: The BBjMenuBar is the top-level bar that fits across the top of the window. BBjMenus are added to the menu bar. Each Top Level window can have one BBjMenuBar.
BBjMenu: A BBjMenu object is a menu that can have menu items and submenus within it. BBjMenu objects can be added to the BBjMenuBar and to other BBjMenus. When they are added to other BBjMenus, an arrow will point from the title and when the arrow is rolled-over, the submenu will appear.
BBjMenuItem: A BBjMenuItem object is a menu item that is not a submenu. It can be added to a BBjMenu. The BBjMenuItem can be checkable. In this case a checkbox will appear next to the menu item's title, and the object returned when the BBjMenuItem is added will be a BBjCheckableMenuItem. When the item is selected, the check will toggle.
The image below (Figure 1) illustrates the three different menu objects:
Constants inherited from BBjControl
CSS
The visual appearance of BUI controls is defined using CSS (cascading style sheets) rules. Easily change the default colors, border, and other settings by customizing these rules, all without changing any application code. See CSS API for a high-level overview of BUI CSS.
The BBjMenuItem defines the following style names:
.BBjMenuItem
.BBjMenuItem.bbj-disabled
.BBjMenuItem.bbj-selected
.BBjMenuItem-check
.BBjMenuItem-check.bbj-selected
.BBjMenuItem-image
.BBjMenuItem-image.bbj-selected
.BBjMenuItem-content
.BBjMenuItem-content.bbj-selected
.BBjMenuItem-accel
.BBjMenuItem-accel.bbj-selected
Example
|
See Also
SETMENU Mnemonic - Set or Replace Menu
DWC Component: dwc-menuitem
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.