
BBjWindow::restoreControl
Description
In BBj 17.0 and higher, this method restores a BBjControl object to the BBjWindow from a BBjTabCtrl.
Syntax
Return Value |
Method |
---|---|
restoreControl(BBjControl control) |
Parameters
Variable |
Description |
---|---|
control |
A BBjControl object that was previously added to a BBjTabCtrl. |
Return Value
Returns the BBjControl object.
Remarks
The BBjControl object can only be restored to its original parent window.
Example
Copy
BBjWindow::restoreControl Example
rem ' restoreControl
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,400,400,"restoreControl",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
print "Create a child window..."
wait 1
child1! = window!.addChildWindow(101,0,0,80,80,"",1)
child1!.setBackColor(BBjColor.YELLOW)
child2! = window!.addChildWindow(102,300,300,80,80,"",2)
child2!.setBackColor(BBjColor.GREEN)
print "Add that child window to a tab control..."
wait 1
tabctrl! = window!.addTabCtrl(100,100,100,200,200)
tabctrl!.addTab("1",child1!)
tabctrl!.addTab("2",child2!)
print "Remove that child window from the tab control..."
wait 1
tabctrl!.removeTab(0)
print "Restore the child window to its original parent window..."
wait 1
window!.restoreControl(child1!)
print "Move and resize the child window..."
wait 1
child1!.setLocation(50,50)
child1!.setSize(150,150)
tabctrl!.setLocation(200,200)
process_events
eoj:
release
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.