Vcl.Menus.TMenu.Items

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Items: TMenuItem read FItems;

C++

__property TMenuItem* Items = {read=FItems};

Properties

Type Visibility Source Unit Parent
property published
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus TMenu

Description

Describes the elements of the menu.

Use Items to access information about the elements in the menu. Items is a single TMenuItem object that describes the elements of the menu in its own Items property.

Note: Because Items is the default property of TMenuItem, the Items property of TMenu can be treated as an indexed array of menu items that describe the individual items in the menu. That is, instead of writing

Note: FirstItem := Menu1.Items.Items[0];

Note: you can use

Note: FirstItem := Menu1.Items[0];

Set the Items property at design time by clicking on the Items property in the Property Inspector. The Menu Designer automatically inserts a menu item. As each menu item is entered, outlined regions appear at the possible locations of additional menu items. Click in those regions to specify additional menu items. At runtime, create a TMenuItem that describes the elements of the menu programmatically, and set the Items property of the menu.

See Also

Code Examples