AddTarget (register toolbar driven entity)

Top  Previous  Next

 

AddTarget( target, control )

AddTarget

Adds a toolbar target to the ToolbarClass object's list of potential toolbar targets.

Target

The label of a ToolbarTarget object.

Control

An integer constant, variable, EQUATE, or expression containing the target's ID number. For targets associated with a control, this is the control number (usually represented by the control's Field Equate Label).

The AddTarget method adds a toolbar target (ToolbarTarget object) to the ToolbarClass object's list of potential toolbar targets.

The last added target is the active target until supplanted by a subsequent call to AddTarget or SetTarget.

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

BRW1.AddToolbarTarget( Toolbar )             !register a BrowseBox target...

!BrowseClass method calls AddTarget

See Also:     SetTarget