User Tools

Site Tools


taketoolbar_assume_control_of_the_toolbar_toolbarupdateclass_.htm
Navigation:  ABC Library Reference > ToolbarUpdateClass > ToolbarUpdateClass Methods >====== TakeToolbar (assume control of the toolbar:ToolbarUpdateClass) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

TakeToolbar, VIRTUAL

blk2blue.jpg

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

taketoolbar_assume_control_of_the_toolbar_toolbarupdateclass_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1