
BBjMenuButton::isDropdownMenuVisible
Description
In BBj 15.0 and higher, this method indicates whether a BBjMenuButton dropdown menu is currently visible (open).
Syntax
Return Value |
Method |
boolean |
isDropdownMenuVisible() |
Parameters
None.
Return Value
Returns a boolean value indicating whether a BBjMenuButton dropdown menu is currently visible.
Remarks
Querying this value from an event that inherently opens or closes the dropdown menu, like the button pressed event handler, can generate misleading results
Example
rem ' BBjMenuButton::isDropdownMenuVisible sysgui = unt open (sysgui)"X0" sysgui! = bbjapi().getSysGui() title$ = "isDropdownMenuVisible" window! = sysgui!.addWindow(100,100,225,125,title$,$00090003$) window!.setCallback(window!.ON_CLOSE,"eoj") window!.setCallback(window!.ON_KEYPRESS,"keypress") menubutton! = window!.addMenuButton(101,25,25,175,25,"MenuButton",$4000$) dropdown! = sysgui!.addPopupMenu() dropdown!.addMenuItem(-201,"Dropdown Item 1") dropdown!.addMenuItem(-202,"Dropdown Item 2") menubutton!.setDropdownMenu(dropdown!) process_events eoj: release keypress: event! = sysgui!.getLastEvent() if event!.getKeyCode()=302 and !menubutton!.isDropdownMenuVisible() then menubutton!.setDropdownMenuVisible(1) endif return |
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.