Sign in Join
FPDoc Onlineexperiment

TMenu.FindItem function

Member of TMenupublicIn unit Menus

Gets the menu item with the specified value in a given property.

Declaration

pascal
function FindItem(AValue: PtrInt; Kind: TFindItemKind): TMenuItem

Arguments

AValue

Value to locate in the property indicated by Kind.

Kind

Identifies the property examined for the specified value.

Function result

Menu item which matches the find criteria, or Nil when not found.

Description

FindItem is a TMenuItem function used to locate a menu item which has the value specified in AValue in a given property. The property examined for the value is specified in the Kind argument.

FindItem searches the menu items stored in the Items property to locate the specified value. The return value is Nil when a menu item is not found with the required value, or a Nil value is found in Items.

FindItem is used to implement methods like GetHelpContext, IsShortcut, and DispatchCommand.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.