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

TMenuItem.Items

Provides indexed access to the child menu items for the current class instance.

Declaration

Source position: menus.pp line 304

public property TMenuItem.Items[Index: Integer] : TMenuItem
  read GetItem;
  default;

Description

Items is a read-only TMenuItem property which provides indexed access to the child menu items for the current class instance. An internal TList member is used to store the TMenuItem property values.

Index contains the ordinal position in the list for the TMenuItem instance returned as the property value.

An EMenuError is raised when accessing a value in the property and the Items list has not been assigned. The exception message reports an "Index Out of Bounds" condition.

TMenuItem instances are added and removed from the internal list using the Add, AddSeparator, Delete, Clear, and Remove methods.

Use the IndexOf, IndexOfCaption, and Find methods to locate a particular menu item in the Items property.


Version 3.2 Generated 2024-02-25 Home