|
+--BBjSysGui
|
+--BBjPopupMenu
In BBj 4.0 and higher, the BBjPopupMenu object provides methods for manipulating a GUI popup menu associated with a control.
A BBjPopupMenu object is manipulated through the following BBjSysGui methods:
|
Return Value |
Method |
|
BBjPopupMenu |
|
|
BBjPopupMenu |
createPopupMenu(int resHandle, int popupMenuID) |
BBjPopupMenu objects can also be manipulated through the following BBjControl methods, which are inherited by all control types except menus:
|
Return Value |
Method |
|
BBjPopupMenu |
|
|
BBjPopupMenu |
|
|
BBjPopupMenu |
|
|
void |
setPopupMenu(BBjPopupMenu popupMenu!) |
|
Return Value |
Method |
|
addMenu(int ID, string title) |
|
|
addMenuItem(int ID, string title) |
|
|
addMenuItem(int ID, string title, int checkable, int checked) |
|
|
addMenuItem(int ID, string title, int action) |
|
|
void |
|
|
getControl(int ID) |
|
|
int |
getID(int index) |
|
getMenu(int ID) |
|
|
getMenuAt(int index) |
|
|
getMenuItem(int ID) |
|
|
getMenuItemAt(int index) |
|
|
int |
getMenuItemIDAt(int index) |
|
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, int checkable, int checked) |
|
|
void |
insertSeparator(int index) |
|
void |
removeMenu(BBjMenu menu) |
|
void |
removeMenu(int ID) |
|
void |
removeMenuAt(int index) |
|
void |
removeMenuItem(BBjMenuItem item) |
|
void |
removeMenuItem(int ID) |
|
void |
removeMenuItemAt(BBjMenuItem index) |
|
void |
removeSeparator(int index) |
|
void |
show(BBjControl control!, int x, int y) |
|
void |
show(int context, int control, int x, int y) |
|
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
|
ON_POPUP_ITEM_SELECT |
P |
||
|
ON_POPUP_REQUEST |
r |
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.
BBjPopupMenu: The BBjPopupMenu appears when the user presses the appropriate mouse button (usually right-click) on a control that has an associated BBjPopupMenu. BBjMenus and/or BBjMenuItems are added to the BBjPopupMenu.
BBjMenu: A BBjMenu object is a menu that can have menu items and submenus within the object. 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 a BBjMenu or directly to the BBjPopupMenu. A BBjMenuItem can be checkable. In this case, a check will appear next to the menu item's title. When the item is selected, the check will toggle.
The image below illustrates the structure of a popup menu with a submenu:

|
REM Create a popup menu |
CALLBACK Verb - Register BBj Subroutine
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.