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 integer * 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 integer Return value indicating whether the function was successful. A negative number indicates that an error occurred.