[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Menus' (#lcl)

TMenu.FindItem

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

Declaration

Source position: menus.pp line 411

public function TMenu.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

TMenu.Items

  

Contains the menu items displayed on the menu.

TMenuItem.Command

  

Numeric command for the menu item as assigned in the widgetset class.

TMenuItem.Handle

  

Handle for the menu item allocated in the widgetset class.

TMenuItem.Shortcut

  

Accelerator key sequence to be used in selecting this menu item.

TFindItemKind

  

TFindItemKind - enumerated type for kind of item in search operation: a command, a handle or a shortcut.


Version 4.0 Generated 2025-05-03 Home