BBjPopupMenu::hide

Description

In BBj 15.0 and higher, this method hides a popup menu if it's currently showing.

Syntax

Return Value

Method

void

hide()

Parameters

None.

Return Value

None.

Remarks

Clicking away from the popup menu's owner control automatically closes it. This method can be used when that default autohide behavior is insufficient.

Example

rem ' BBjPopupMenu::hide

sysgui! = bbjapi().openSysGui("X0")
window! = sysgui!.addWindow(200,200,300,100,"BBjPopupMenu::hide",$10090003$)
window!.setCallback(BBjWindow.ON_CLOSE,"eoj")
window!.setCallback(window!.ON_MOUSE_DOWN,"MouseDown")
listedit! = window!.addListEdit(101,25,25,200,25,"")
listedit!.setCallback(listedit!.ON_LIST_OPEN,"ShowPopup")
popup! = sysgui!.addPopupMenu()
item1! = popup!.addMenuItem(201,"Item1")
item2! = popup!.addMenuItem(202,"Item2")
process_events

eoj:
release

ShowPopup:
    popup!.show(listEdit!,0,listedit!.getHeight())
return

MouseDown:
    event! = sysgui!.getLastEvent()
    if event!.getMouseButton()<>1then return
        control! = event!.getOriginalControl()
        if control!=listedit! then popup!.hide()
    return

See Also

BBjAPI

BBjSysGui Methods

BBjControl Methods

BBjPopupMenu

BBjMenu

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.