1

I had a TActionMainMenuBar in a form and I want to customize the preferences in runtime, is possible show the same dialog displayed in desgin time, but in runtime?

enter image description here

Salvador
  • 16,132
  • 33
  • 143
  • 245

1 Answers1

4

You can use the TCustomizeDlg component

  1. Drop the TCustomizeDlg component to your form
  2. Set the ActionManeger property value to your ActionManager component
  3. Call the Show method of the TCustomizeDlg component

or Also you can add a TCustomizeActionBars standard action to your Menu.

RRUZ
  • 134,889
  • 20
  • 356
  • 483
  • +1 Is there then a good way to save the customized layout to user preferences, or do you need to roll your own? – David Heffernan Mar 06 '12 at 20:20
  • 3
    @DavidHeffernan, the TActionManager component has a [FileName](http://docwiki.embarcadero.com/Libraries/en/Vcl.ActnMan.TActionManager.FileName) property to read and write the layout information. – RRUZ Mar 06 '12 at 20:26
  • Thanks. I'm curious. My program does not offer customization of its menus and toolbars. Users used to ask for this but strangely they have not done so in recent times. Perhaps it's the Office 2007 effect! Anyway, this is nice to know should we ever relent one day and let our users have this capability. – David Heffernan Mar 06 '12 at 20:36
  • There is no "TCustomizeActionBars" in Delphi Sydney. – Gabriel Nov 20 '20 at 12:43