Sign in Join
FPDoc Onlineexperiment

TMenuItem.Items property

Member of TMenuItempublicIn unit Menus

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

Declaration

pascal
property 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.

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