LabWindows/CVI

Toolbar_ActivateItem

int Toolbar_ActivateItem (ToolbarType toolbar, int position, int active, int refresh);

Purpose

Activates or deactivates a particular item on the toolbar. This allows you to have more items on the toolbar than are actually displayed and switch between them.

If you set the refresh parameter to false, the toolbar remains in the old state until you call Toolbar_Display, at which point the toolbar will be refreshed.

Parameters

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 int The position of the item in 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.
active int Specify a nonzero value or select Yes in the function panel to make the item active.

Specify 0 or select No in the function panel to make the item inactive.
refresh int Specify a nonzero value or select Yes in the function panel to refresh the toolbar.

Specify 0 or select No in the function panel if you do not want to refresh the toolbar.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: Toolbar

Include file: custctrl\toolbar.h

LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later