
BBjMenu::getChildCount
Description
In BBj 8.0 and higher, this method returns the number of items in a BBjMenu.
Syntax
Return Value |
Method |
---|---|
int |
getChildCount() |
Parameters
None.
Return Value
Returns the number of items in a BBjMenu.
Remarks
None.
Example
Copy
BBjMenu::getParentMenu Example
rem ' BBjMenu::getChildCount
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "BBjMenu::getChildCount"
window! = sysgui!.addWindow(100,100,300,100,title$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
menubar! = window!.addMenuBar()
file! = menubar!.addMenu(-100,"&File")
exit! = file!.addMenuItem(-101,"E&xit")
exit!.setCallback(exit!.ON_MENU_ITEM_SELECT,"eoj")
edit! = menubar!.addMenu(-200,"&Edit")
undo! = edit!.addMenuItem(-201,"Undo")
redo! = edit!.addMenuItem(-202,"Redo")
cut! = edit!.addMenuItem(-203,"Cu&t",sysgui!.CUT)
copy! = edit!.addMenuItem(-204,"&Copy",sysgui!.COPY)
paste! = edit!.addMenuItem(-205,"&Paste",sysgui!.PASTE)
view! = menubar!.addMenu(-300,"&View")
help! = menubar!.addMenu(-400,"&Help")
count = edit!.getChildCount()
msg$ = "Edit Menu countains " + str(count) + " items."
i = msgbox(msg$,0,title$)
process_events
eoj:
release
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.