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

TMUIMenustrip

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

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

Declaration

Source position: MUIClass.Menu.pas line 17

type TMUIMenustrip = class(TMUIFamily)

protected

  procedure GetCreateTags(); override;

  

Fill TagList for MUI item creation

public

  constructor Create; override;

  

Create a MenuStrip object

  procedure CreateObject; override;

  

Create the MUI item

published

  property Enabled: Boolean; [rw]

  

Enable or disable the complete menu strip.

end;

Inheritance

TMUIMenustrip

  

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

|

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

Its children are objects of Menu class, each of them describes exactly one menu.

A Menustrip object doesn't feature many options itself, but as a subclass of Family class, it simply acts as father for multiple Menu objects.

The Menustrip object is usually specified as a child of either Application class or window class with the attributes MUIApp.MenuStrip or Window.MenuStrip.

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

Menu

  

Objects of menu class describe exactly one pulldown menu.

MenuItem

  

Menuitem class describes a single menu item.


Documentation generated on: 2024-03-28