ToolbarItem objects
Determines the state of a toolbar item. Values are:
Value |
Description |
---|---|
0 |
Disables a toolbar button |
1 |
Specifies a StyleCheck! or StyleCheckGroup! toolbar button in the depressed state |
2 |
Specifies a StyleButton! toolbar button in a transitional depressed state |
4 |
Enables a toolbar button for selection |
32 |
Specifies that the next item in the toolbar will wrap to a separate line if it is not part of the same toolbar item group |
Values are additive. For example, suppose you want to set a toolbar button with the checked state (1) and enable it (4), with the next set of buttons wrapped to a different line (32). You would enter 37 for the value of the ItemState property.
When you add a toolbar item in the Properties view for a Toolbar control, the default value for the ItemState property is 4. If you clear the ItemEnabled check box, the ItemState property changes to 0. In the PocketBuilder UI, there is currently no other way to change the ItemState value directly or to assign it a value other than 0 or 4.
The default value for the ItemState property of a toolbar item that you add in script is 0. You can change the property directly in script by assigning a valid ItemState value or by calling SetItemState on the Toolbar control.
To select a style for a toolbar item:
Select the toolbar item on the Items page of the Properties view for a Toolbar control.
Select or clear the Enabled check box.
Selecting the Enabled check box sets the ItemState value to 4.
The ItemState property has an integer datatype. The following example enables the toolbar button and sets the toolbar item with a checked state:
tbi_myToolbarItem.ItemState = 5
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |