Navigation: ABC Library Reference > ToolbarListBoxClass > ToolbarListboxClass Methods >====== TakeToolbar (assume contol of the toolbar) ====== | |
TakeToolbar, VIRTUAL
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, ToolbarClass.SetTarget