BBjPopupMenu::getChildCount

Description

In BBj 8.0 and higher, this method returns the number of items in a BBjPopupMenu.

Syntax

Return Value

Method

int

getChildCount()

Parameters

None.

Return Value

Returns the number of items in a BBjPopupMenu.

Remarks

None.

Example

rem ' BBjPopupMenu::getChildCount

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,200,200,"BBjPopupMenu",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
button! = window!.addButton(1,50,50,100,25,"Button")
button!.setCallback(button!.ON_BUTTON_PUSH,"event")
PopupMenu! = Button!.addPopupMenu()
Item1! = PopupMenu!.addMenuItem(-201,"Item 1")
Item1!.setCallback(Item1!.ON_POPUP_ITEM_SELECT,"popup")
Item2! = PopupMenu!.addMenuItem(-202,"Item 2")
Item2!.setCallback(Item2!.ON_POPUP_ITEM_SELECT,"popup")
count = PopupMenu!.getChildCount()
msg$ = "BBjPopupMenu::getChildCount = " + str(count)
print msg$
i = msgbox(msg$,0,"getChildCount")
process_events

eoj:
release

event:
    event! = sysgui!.getLastEvent()
    i = msgbox(event!.getControl().getText(),0,event!.getEventName())
return

popup:
    event! = sysgui!.getLastEvent()
    i = msgbox(event!.getMenuItem().getText(),0,event!.getEventName())
return

See Also

BBjAPI

BBjSysGui Methods

BBjControl

BBjWindow Methods

BBjMenu

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