Vcl.CategoryButtons.TButtonCategories.ItemIndex

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ItemIndex(const Caption: string): Integer;

C++

int __fastcall ItemIndex(const System::UnicodeString Caption);

Properties

Type Visibility Source Unit Parent
function public
Vcl.CategoryButtons.pas
Vcl.CategoryButtons.hpp
Vcl.CategoryButtons TButtonCategories

Description

ItemIndex returns the index of the button category with the given caption, ignoring collapsed categories.

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.

See Also