BBjMenu
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjMenuBar > BBjMenu
Description
The BBjMenu object provides methods for manipulating a GUI menu control.
Creation
A BBjMenu object is created through the following BBjMenuBar methods:
Return Value |
Method |
---|---|
BBjMenu |
addMenu(int ID, string title) |
BBjMenu |
getMenu(int ID) |
BBjMenu |
getMenuAt(int index) |
BBjMenu |
insertMenu(int index, int ID, string title) |
Methods of BBjMenu
Return Value |
Method |
---|---|
addCheckableMenuItem(int ID, string title) |
|
addCheckableMenuItem(int ID, string title, boolean checked) |
|
addMenu(int ID, string title) |
|
addMenuItem(int ID, string title) addMenuItem(int ID, string title, int action) addMenuItem(int ID, string title, boolean checkable, boolean checked) addMenuItem(int ID, string title, boolean checkable, boolean checked, int action) |
|
void |
|
getCheckableMenuItem(int ID) |
|
getCheckableMenuItemAt(int index) |
|
int |
|
getMenu(int ID) |
|
getMenuAt(int index) |
|
getMenuItem(int ID) |
|
getMenuItemAt(int index) |
|
int |
getMenuItemIDAt(int index) |
insertCheckableMenuItem(int index, int ID, string title, boolean checked) |
|
insertMenu(int index, int ID, string title) |
|
insertMenuItem(int index, int ID, string title) insertMenuItem(int index, int ID, string title, int action) insertMenuItem(int index, int ID, string title, boolean checkable, boolean checked) |
|
void |
insertSeparator(int index) |
void |
removeMenu(int ID) |
void |
removeMenuAt(int index) |
void |
removeMenuItem(BBjMenuItem item!) removeMenuItem(int ID) |
void |
removeMenuItemAt(int index) |
void |
removeSeparator(int index) |
Methods of BBjMenu inherited from BBjControl
Events
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
---|---|---|---|
ON_MENU_ITEM_SELECT |
C |
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 BBjMenu defines the following style names:
.BBjMenu
.BBjMenu.bbj-disabled
.BBjMenu.bbj-selected
.BBjMenu-check
.BBjMenu-check.bbj-selected
.BBjMenu-image
.BBjMenu-image.bbj-selected
.BBjMenu-content
.BBjMenu-content.bbj-selected
.BBjMenu-accel
.BBjMenu-accel.bbj-selected
Remarks
All ID values should be negative. If they are not specified as negative values, they will be converted to negative values 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. They can be added to BBjMenus. The BBjMenuItem can be checkable. In this case a checkbox will appear next to the menu item's title. When the item is selected, the check will toggle.
The image below (Figure 1) illustrates the three different menu objects:
Constants inherited from BBjControl
Example
|
See Also
SETMENU Mnemonic - Set or Replace Menu
CALLBACK Verb - Register BBj Subroutine
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.