Unit 'MUIClass.Menu' Package
[Overview][Classes][Index] [#MUIClass]

TMUIMenu

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Objects of menu class describe exactly one pulldown menu.

Declaration

Source position: MUIClass.Menu.pas line 31

type TMUIMenu = class(TMUIFamily)

protected

  procedure GetCreateTags(); override;

  

Fill TagList for MUI item creation

public

  constructor Create; override;

  

Create a Menu object

  procedure CreateObject; override;

  

Create the MUI item

published

  property Enabled: Boolean; [rw]

  

Enable or disable the complete menu.

  property Title: string; [rw]

  

Describe the title of the menu.

end;

Inheritance

TMUIMenu

  

Objects of menu class describe exactly one pulldown menu.

|

TMUIFamily

  

Base class with list of children

|

TMUIWithParent

  

Subclass of TNotify to introduce the Parent relation

|

TMUINotify

  

Notify class is superclass of all other MUI classes.

|

TMUIRootClass

  

Base class for all MUI Class

|

TObject

Description

They don't feature many options themselves, but as a subclass of Family class, they act as father for their several menu item objects.

Example:

MainMenu := TMUIMenuStrip.Create;

// MUIApp.MenuStrip := MainMenu; // alternative on the application, activate only one!
Window.Menustrip := MainMenu;

Men := TMUIMenu.Create;
with Men do
begin
  Title := 'Test Menu';   // Name of Menu (thats the one in the ScreenBar)
  Parent := MainMenu;     // attach to the Menustrip
end;

With TMUIMenuItem.Create do
begin
  Title := 'Config';         // Text on the menu item
  Parent := Men;             // attach to the Menu
  OnTrigger := @ConfigStart; // Event to call when selected
end;

with TMUIMenuItem.Create do
begin
  Title := 'Quit';
  Parent := Men;
  OnTrigger := @QuitMe;
end;

See also

MenuStrip

  

Menustrip class is the Parent class for MUI's object oriented menus.

MenuItem

  

Menuitem class describes a single menu item.


Documentation generated on: 2024-12-25