| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ToolbarListBoxClass > ToolbarListboxClass Methods >====== TakeToolbar (assume contol of the toolbar) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[takeevent convert toolbar events toolbarlistboxclass .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[trytaketoolbar return toolbar control indicator toolbarlistboxclass .htm|{{btn_next_n.gif|Next page}}]] | | || **TakeToolbar, VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} The **TakeToolbar **method sets the toolbar state appropriate to the ToolbarListboxClass object. **Implementation:** The TakeToolbar method sets appropriate TIP attributes for the toolbar buttons and enables and disables toolbar buttons appropriate for the ToolbarListboxClass object. The ToolbarClass.SetTarget method and the TryTakeToolbar method call the TakeToolbar method. **Example:** **MyToolbarClass.SetTarget PROCEDURE(SIGNED Id)** **I USHORT,AUTO** **Hit USHORT** **  CODE** **    ASSERT(~ (SELF.List &= NULL))** **    IF Id                     !set explicitly requested target** **      SELF.List.Id = Id** **      GET(SELF.List,SELF.List.Id)** **      ASSERT (~ERRORCODE())** **      SELF.List.Item.TakeToolbar** **    ELSE                      !set any (last) valid target** **      LOOP I = 1 TO RECORDS(SELF.List)** **        GET(SELF.List,I)** **        IF SELF.List.Item.TryTakeToolbar() THEN Hit = I.** **      END** **      IF Hit THEN GET(SELF.List,Hit).** **    END** **See Also:**     [[trytaketoolbar return toolbar control indicator toolbarlistboxclass .htm|TryTakeToolbar]], [[settarget sets the active target .htm|ToolbarClass.SetTarget]]