Gets the state of a toolbar item.
Toolbar controls
Integer controlname.GetItemState ( toolbarindex )
Argument |
Description |
---|---|
controlname |
The name of the toolbar control |
toolbarindex |
Integer for the index of the toolbar item |
Integer. Values can be any of the values described in the following table, or combinations of these values:
Value |
Windows CE value |
Description |
---|---|---|
1 |
TBSTATE_CHECKED |
The toolbar button has a StyleCheck! or StyleCheckGroup! style and remains in the depressed state |
2 |
TBSTATE_PRESSED |
The toolbar button has a StyleButton! style and is temporarily in the depressed state |
4 |
TBSTATE_ENABLED |
The toolbar button is enabled for selection |
32 |
TBSTATE_WRAP |
The next item in the toolbar that is not grouped with the current toolbar button is on a separate line |
Values are additive. For example, a toolbar button with the checked state (1) can also be enabled (4) and wrapped (32). In this case the return value would be 37.
Returns -1 if an error occurs.
The following example gets the state for the second item in the toolbar and places it in a local variable:
integer li_picstate
li_picstate = tlbr_mytoolbar.GetItemState(2)