User Tools

Site Tools


taketoolbar_assume_contol_of_the_toolbar_.htm
Navigation:  ABC Library Reference > ToolbarListBoxClass > ToolbarListboxClass Methods >====== TakeToolbar (assume contol of the toolbar) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

TakeToolbar, VIRTUAL

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, ToolbarClass.SetTarget

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