LabWindows/CVI

Toolbar_GetIndexFromDescription

int Toolbar_GetIndexFromDescription (ToolbarType toolbar, const char *description, int *index);

Purpose

Searches for an item on the toolbar with a particular description. You can use this function if you do not know the position, or index, of the item on the toolbar, but you do know the name of the item.

Parameters

Input
Name Type Description
toolbar ToolbarType The specifier for the toolbar.

Obtain this handle from the Toolbar_New or Toolbar_Duplicate functions.
description const char * The description of the toolbar item to search for, as specified in Toolbar_InsertItem.
Output
Name Type Description
index int Returns the index of the first toolbar item with the specified label or –1 if no matching item is found.

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