BBjSysGui::addPopupMenu

Description

In BBj 4.00 and higher, this method creates a BBjPopupMenu control.

Syntax

Return Value

Method

BBjPopupMenu

addPopupMenu()

Parameters

None.

Return Value

Returns a BBjPopupMenu object.

Example

sysgui = unt
open (sysgui)"X0"
popup! = BBjAPI().getSysGui().addPopupMenu()
popup!.addMenuItem(-32027,"Cut")
popup!.addMenuItem(-32028,"Copy")
popup!.addMenuItem(-32029,"Paste")
popup!.addMenuItem(-1,"Sample")
print (sysgui)'window'(100,100,100,100,"",$00010003$,$00000001$)
print (sysgui)'inpute'(101,10,10,80,25,$$,255,"",1,"","")
print (sysgui)'inputn'(102,10,40,80,25,$$,"-###,###.00",$$,0,0)
print (sysgui)'inputd'(103,10,70,80,25,$0008$,"",$$,jul(0,0,0),jul(0,0,0))
dim event$:tmpl(sysgui)
repeat
    readrecord(sysgui,siz = 10)event$
    if event.code$="r" then popup!.show(event.context,event.id,event.x,event.y)
    if event.code$="P" then i = msgbox("Popup menu item selected")
until event.code$="X"
release

See Also

BBjAPI

BBjWindow

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