| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ToolbarClass > ToolbarClass Methods >====== AddTarget (register toolbar driven entity) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[toolbarclass functional organization expected use.htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[displaybuttons enable appropriate toolbar buttons toolbarclass .htm|{{btn_next_n.gif|Next page}}]] | | || **AddTarget( **//target, control //**)** {{blk2blue.jpg|blk2blue.jpg}} | **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 sets the active target .htm|SetTarget]]