Difference between revisions of "IDE Window: Menu Editor"

From Free Pascal wiki
Jump to navigationJump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{IDE Window: Menu Editor}}
 
{{IDE Window: Menu Editor}}
  
The Menu Editor is a non-modal window of the Lazarus IDE which allows you to edit menu components (TMainMenu and TPopupMenu) by adding, deleting and editing existing menu items (TMenuItem).
+
{{Note|Description of old version Menu Editor you can see (and edit) at [[Talk:IDE_Window:_Menu_Editor|discussion page]]}}
The menu editor is invoked by right-clicking on a menu component once it had been dropped on a form (or datamodule) when designing. You can find the menu component on you Main Window toolbar or on you components sub-window.
 
  
[[File:TMainMenuComponent1.png]][[File:[[File:NewFormWithMainMenu01.png]] 
+
==About==
  
Click the component and drop it onto the form that you are designing.
+
"Menu editor" is dialog which allows to customize contents of menus: [[TMainMenu]], [[TPopupMenu]].
  
[[File:MenuEditor01.png]]
+
[[File:menueditor-popupmenu.png]]
[[File:MenuEditor02.png]]
 
  
 +
==Preview area==
 +
This area shows preview of menu designed. For TMainMenu it shows horizontal band with top-level items, for TPopupMenu it shows vertical band (more vertical bands shown for each submenu).
 +
Clickable labels:
  
By clicking on the Menu Editor you can now begin to edit your menu. When the Menu Editor opens a new item is shown. The Object Inspector under the Favorites tab shows the Caption and Name of the item -- change it as necessary. For example, if this is to be a file menu you can make the Caption read File and the Name read MenuItemFile.
+
* "Add menu item" to add item. This label is shown when the last item of menu is selected (in TPopupMenu - bottom item).
 +
* "Add submenu" to add child submenu.
  
[[File:NewFormWithMainMenu02.png]]
+
To edit properties of an item, click it on preview, then call Object Inspector. Or you can skip using OI, instead use right-click on each item.
  
Following the change the MenuEditor reflects these changes.  If the menu bar on you form is to have other main menu categories these can be added by right clicking you are given the option for adding an item before or after the one shown.  If you select to add the item after, a New Item2 now appears.  You can then change this item to reflect whatever name you wish to see on the menu bar of your form -- for example, Edit, Search, View, Options, Help, etc.
+
==Action buttons==
  
You can also from this same Pop-up menu create sub menu items for things like opening files, editing, searching, etc.  Further sub-menus can also be created.
+
Buttons with icons peform these actions:
  
[[File:NewFormWithMainMenu03.png]]
+
* icons "long arrows": Move selected item up/down (or left/right in TMainMenu top level).
 +
* icons "plus with line": Add separator item above/below selected item. Disabled for TMainMenu top level.
 +
* icon "minus": Delete selected item.
 +
* icons "plus with 1 arrow": Add item before/after selected item (and select it).
 +
* icon "plus with 2 arrows": Add submenu for selected item (and select its first item).
 +
 
 +
Icons are different for TMainMenu top level (since items here are arranged horizontally).

Latest revision as of 11:10, 25 August 2017

English (en) suomi (fi)

Light bulb  Note: Description of old version Menu Editor you can see (and edit) at discussion page

About

"Menu editor" is dialog which allows to customize contents of menus: TMainMenu, TPopupMenu.

menueditor-popupmenu.png

Preview area

This area shows preview of menu designed. For TMainMenu it shows horizontal band with top-level items, for TPopupMenu it shows vertical band (more vertical bands shown for each submenu). Clickable labels:

  • "Add menu item" to add item. This label is shown when the last item of menu is selected (in TPopupMenu - bottom item).
  • "Add submenu" to add child submenu.

To edit properties of an item, click it on preview, then call Object Inspector. Or you can skip using OI, instead use right-click on each item.

Action buttons

Buttons with icons peform these actions:

  • icons "long arrows": Move selected item up/down (or left/right in TMainMenu top level).
  • icons "plus with line": Add separator item above/below selected item. Disabled for TMainMenu top level.
  • icon "minus": Delete selected item.
  • icons "plus with 1 arrow": Add item before/after selected item (and select it).
  • icon "plus with 2 arrows": Add submenu for selected item (and select its first item).

Icons are different for TMainMenu top level (since items here are arranged horizontally).