Unit 'MUIClass.Base' Package
[Overview][Types][Classes][Procedures and functions][Variables][Index] [#MUIClass]

TMUIApplication.Menustrip

[i] Specify a menu strip object for the application.

Declaration

Source position: MUIClass.Base.pas line 223

published property TMUIApplication.Menustrip : TMUINotify
  read FMenuStrip
  write SetMenuStrip;

Description

The object is treated as a child of the application and will be disposed when the application is disposed.

Menustrip objects defined for the application are used as menu for every window of the application, as long as the window doesn't define its private menu.

Example:

MUIApp.MenuStrip := TMUIMenuStrip.Create;

Men := TMUIMenu.Create;
with Men do
begin
  Title := 'Test Menu';        // Name of Menu (thats the one in the ScreenBar)
  Parent := MUIApp.MenuStrip;  // 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;

Documentation generated on: 2022-07-30