BBjPopupMenu::getControl
Description
In BBj 8.0 and higher, this method returns a BBjControl within the BBjPopupMenu's hierarchy.
Syntax
Return Value |
Method |
---|---|
BBjControl |
getControl(int ID) |
Parameters
Variable |
Description |
---|---|
ID |
The ID of a BBjMenu or BBjMenuItem under BBjPopupMenu. |
Return Value
Returns the BBjControl within the BBjPopupMenu's hierarchy with the specified ID.
Remarks
None.
Example
Copy
BBjPopupMenu::getControl Example
rem ' BBjPopupMenu::getControl
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "getControl"
window! = sysgui!.addWindow(50,50,200,100,title$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
button! = window!.addButton(1,25,25,150,25,"OK")
popup! = button!.addPopupMenu()
submenu! = popup!.addMenu(-200,"Su&b Menu 1")
item1! = submenu!.addMenuItem(-201,"Sub Menu Item 1")
item2! = submenu!.addMenuItem(-202,"Sub Menu Item 2")
popup!.getControl(-201).setText("New Text for Item 1")
process_events
eoj:
release
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.