Vcl.Menus.TMenuItem.IndexOf
Delphi
function IndexOf(Item: TMenuItem): Integer;
C++
int __fastcall IndexOf(TMenuItem* Item);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Menus.pas Vcl.Menus.hpp |
Vcl.Menus | TMenuItem |
Description
Returns the position of a menu item within the Items array.
Call IndexOf to locate a menu item in the submenu headed by this menu item. IndexOf returns 0 for the first menu item, 1 for the second menu item, and so on. If the menu item is not in the submenu, IndexOf returns -1.
Note: IndexOf may not correspond to the position of the item in the menu the user sees if the menu includes some items that are not visible.