THYMenuItemDef

Overview

The THYMenuItemDef class is used to represent a menu item definition. Items of this type are stored inside a THYPluginControlsRepository component and used to create menu items at runtime.

Location


 

constructor Create  override

Creates a new instance of the class.

constructor Create(aCollection: TCollection)

Parameters:

  • aCollection: Reference to a parent collection.

Action    (declared in THYActionItemDef)

Gets or sets link to the action that will be linked to the control created in the host form by a toolbar or menu controller. Properties such as caption, shortcut, image bitmap, etc. must be properly assigned to the action.

property Action: TBasicAction read write

Assign  override

Assigns an action from the source object to this object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Reference to the source object.

Caption

Gets or sets caption of the menu item.

property Caption: string read write

Collection    (declared in THYRepositoryCollectionItem)

Gets reference to the THYRepositoryCollection that holds this item.

property Collection: THYRepositoryCollection read

Items

Gets or sets reference to a menu item list.

property Items: THYMenuItemDefList read write

ItemType

Gets or sets menu item type.

property ItemType: THYMenuItemDefType read write

ReferenceCaption

Gets or sets caption of the referenced menu item.

property ReferenceCaption: string read write

ReferencePositioning

Gets or sets value that indicates position of the menu item.

property ReferencePositioning: THYMenuPositioning read write

SetAction  protected override

Sets the link to an action.

procedure SetAction(const Value: TBasicAction)

Parameters:

  • Value: Reference to an action.

 

Action    (declared in THYActionItemDef)

Gets or sets link to the action that will be linked to the control created in the host form by a toolbar or menu controller. Properties such as caption, shortcut, image bitmap, etc. must be properly assigned to the action.

property Action: TBasicAction read write

Caption

Gets or sets caption of the menu item.

property Caption: string read write

Collection    (declared in THYRepositoryCollectionItem)

Gets reference to the THYRepositoryCollection that holds this item.

property Collection: THYRepositoryCollection read

Items

Gets or sets reference to a menu item list.

property Items: THYMenuItemDefList read write

ItemType

Gets or sets menu item type.

property ItemType: THYMenuItemDefType read write

ReferenceCaption

Gets or sets caption of the referenced menu item.

property ReferenceCaption: string read write

ReferencePositioning

Gets or sets value that indicates position of the menu item.

property ReferencePositioning: THYMenuPositioning read write

 

constructor Create  override

Creates a new instance of the class.

constructor Create(aCollection: TCollection)

Parameters:

  • aCollection: Reference to a parent collection.

Assign  override

Assigns an action from the source object to this object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Reference to the source object.

SetAction  protected override

Sets the link to an action.

procedure SetAction(const Value: TBasicAction)

Parameters:

  • Value: Reference to an action.