BBjMenuItem::getParentMenu

Description

In BBj 16.0 and higher, this method returns the parent BBjMenu of this BBjMenuItem, or NULL() if the immediate parent of this BBjMenuItem is not a BBjMenu.

Syntax

Return Value

Method

BBjMenu

getParentMenu()

Parameters

None.

Return Value

Returns the parent BBjMenu of this BBjMenuItem, or NULL() if the immediate parent of this BBjMenu is not a BBjMenu.

Remarks

None.

Example

rem ' BBjMenuItem::getParentMenu

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "BBjMenuItem::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")
item! = submenu!.addMenuItem(-202,"Sub Sub Item 05")
msg$ = "BBjMenuItem '"+item!.getText()+"' getParentMenu = '"
msg$ = msg$ + item!.getParentMenu().getText() + "'"
print msg$
i = msgbox(msg$,0,title$)
process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

BBjMenu

BBjMenuItem

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