Delphi 2010 Action Manager and Main Menu

I am trying to use the Action control panel and the Main Menu panel in Delphi 2010, and I have no idea how to do this. I tried to take a look at the examples that come with Delphi 2010, and I cannot figure it out.

I tried playing with examples. I was able to add an image to the image list component and set this item to a new item index. At design time, it displays correctly at runtime; it reverts back to the original.

I would like to learn how to use the Action Manager panel and the Action Main Menu, but I can find any help on these topics. Is there a tutorial on how to use the Action control panel and the Action main menu bar?

+4
source share
2 answers
  • Drag ActionManager, ActionMainMenuBar and ImageList into your form.
  • Double-click ImageList, you will get the Imagelist editor. Use the Add-button to add icons (make sure that their sizes match the Height and Width parameters specified in the ImageList control).
  • Set the Images-property ActionManager for your ImageList and set the ActionManager property of your ActionMainMenuBar to the ActionManager.
  • Double-click the ActionManager, go to the "Actions" tab and add new actions using the "Create" button.
  • Select each action in the ActionManager and set all the properties of the action, at least: ImageIndex (select the icon), Caption, and Category. Note. The category will serve as the main element in the menu (for example, “File”, “Edit” and “View”), and each action will serve as a menu item (for example, “Save”, “Save as”, “Download”). Therefore, set the Category property to all the actions that you want to belong to one element of the main menu with the same name. For example, give the actions "Save" and "Download" the category "File" and give the actions "Cancel" and "Repeat" the category "Change".
  • Double-click each action in the ActionManager. You will receive a code editor. Enter the code that you want to execute when the user clicks this menu item. If you do not enter a code or comment, the menu item will be automatically disabled when the application is launched.
  • Now drag categories from ActionManager to ActionMainMenuBar.

What is it.

+7
source

I think Actions, action lists, and action managers from Brian Long are a great place to start exploring the realm of action.

+6
source

All Articles