int Toolbar_SetItemVal (ToolbarType toolbar, int position, . . .);
Sets the value of an item on the toolbar. Setting the value on a separator, command button, or picture pulldown menu item has no effect.
Rings
When called on a ring toolbar item, it sets the current list item to the first item whose associated value is value.
Exclusive Toggle Buttons
When you set the value of an exclusive toggle button to on (1), all the other buttons in the exclusive toggle set are set to off.
You cannot set an exclusive toggle button to off (0) explicitly, since this would violate the designed behavior of the exclusive toggle set. Instead, you should choose which button you want to be on, and when you set it to on (1), all the other buttons in the set will be turned off.
If there is a menu item associated with the exclusive toggle button, the menu item will be checked when the toggle button is set to on, and unchecked when the toggle button is automatically turned off.
Input | ||
Name | Type | Description |
toolbar | ToolbarType | The specifier for the toolbar that contains the item. Obtain this handle from the Toolbar_New or Toolbar_Duplicate functions. |
position | integer | The position of the item on the toolbar. Valid positions are from 1 to the number of items on the toolbar (as returned by Toolbar_GetNumItems). You also can use FRONT_OF_LIST or END_OF_LIST to specify the beginning or the end of the list, respectively. Separator, move handle, and picture pulldown menu items have no value. |
value | any type (passed by value) | The value of the toolbar item. The data type of value must match the data type of the item. For text pulldown menus, the value is a string that replaces the text on the button. |
Name | Type | Description |
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred. |