ItemIndex returns the index of the button category with the given caption, ignoring collapsed categories.
function ItemIndex(const Caption: string): Integer;
__fastcall int ItemIndex(const AnsiString Caption);
Call ItemIndex to obtain the index of the button category in the Items category list, with the caption specified through the Caption parameter.
ItemIndex ignores all the collapsed button categories, as opposed to the IndexOf method, that looks through all categories, both visible and non-visible.
ItemIndex first looks up the item with the given caption in the currently selected button category. Then, ItemIndex does both a case-sensitive and a case-insensitive search through the visible items in the category list.
ItemIndex returns the index of the button category with the given caption, if found, or -1 otherwise.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!