Navigation: ABC Library Reference > ToolbarUpdateClass > ToolbarUpdateClass Methods >====== TakeToolbar (assume control of the toolbar:ToolbarUpdateClass) ====== | ![]() ![]() |
TakeToolbar, VIRTUAL
The **TakeToolbar **method sets the toolbar state appropriate to the ToolbarUpdateClass object.
Implementation:
The TakeToolbar method sets appropriate TIP attributes for the toolbar buttons and enables and disables toolbar buttons appropriate for the ToolbarUpdateClass object. The ToolbarClass.SetTarget method and the TryTakeToolbar method call 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( -1 ) !calls TakeToolbar**
** !program code**
MyToolbarUpdateClass.TakeToolbar PROCEDURE !a derived class virtual
** CODE**
** !your custom code here**
** SELF.DisplayButtons !enable appropriate buttons**
See Also: ToolbarClass.SetTarget, TryTakeToolbar





