Navigation: ABC Library Reference > ToolbarReltreeClass > ToolbarReltreeClass Methods >====== TakeToolbar (assume control of the toolbar:ToolbarReltreeClass) ====== | |
TakeToolbar, VIRTUAL
The TakeToolbar method sets the toolbar state appropriate to the ToolbarReltreeClass object.
Implementation:
The TakeToolbar method sets appropriate TIP attributes for the toolbar buttons and enables and disables toolbar buttons appropriate for the ToolbarReltreeClass object. The ToolbarClass.SetTarget method calls the TakeToolbar method.
Example:
CODE
Toolbar.Init !initialize Toolbar object
ToolBar.AddTarget( ToolBarForm, -1 ) !register an Update Form target
Toolbar.AddTarget( REL1::Toolbar, ?RelTree ) !register a RelTree target
ToolBar.SetTarget( ?RelTree ) !calls TakeToolbar
!program code
MyToolbarReltreeClass.TakeToolbar PROCEDURE !a derived class virtual
CODE
!your custom code here
SELF.DisplayButtons !enable appropriate buttons
See Also: ToolbarClass.SetTarget