
BBjMenu::getParentMenu
Description
In BBj 16.0 and higher, this method returns the parent BBjMenu of this BBjMenu, or NULL() if the immediate parent of this BBjMenu is not a BBjMenu.
Syntax
Return Value |
Method |
---|---|
getParentMenu() |
Parameters
None.
Return Value
Returns the parent BBjMenu of this BBjMenu, or NULL() if the immediate parent of this BBjMenu is not a BBjMenu.
Remarks
None.
Example
Copy
BBjMenu::getParentMenu Bar
rem ' BBjMenu::getParentMenu
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "BBjMenu::getParentMenu"
flags$ = $00090003$
window! = sysgui!.addWindow(100,100,300,100,title$,flags$)
window!.setCallback(window!.ON_CLOSE,"eoj")
menubar! = window!.addMenuBar()
menu! = menubar!.addMenu(-100,"&First")
menu!.addMenuItem(-101,"&Sub Item 01")
menu!.addMenuItem(-102,"S&ub Item 02")
submenu! = menu!.addMenu(-200,"Su&b Item 03")
submenu!.addMenuItem(-201,"Sub Sub Item 04")
submenu!.addMenuItem(-202,"Sub Sub Item 05")
submenu$ = submenu!.getText()
parent$ = submenu!.getParentMenu().getText()
msg$ = "Parent of "+submenu$+" is "+parent$
print msg$
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.