TMenuItem.IndexOfCaption function
Gets the ordinal position in Items for the menu item with the specified Caption.
Declaration
function IndexOfCaption(const ACaption: string): Integer; virtualArguments
ACaption | Caption text to locate in the child Items for the menu item. |
Function result
Ordinal position for the menu item with the given caption, or -1 when not found.
Description
IndexOfCaption visits the
TMenuItem instances in the
Items property to locate the menu item with the
Caption
specified in
ACaption. Case is significant when comparing the
value in ACaption to the menu item(s).
The return value contains the ordinal position in Items for the menu item with the specified caption, or -1 when a menu item is not found.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
