2
votes

How to remove the Accelerators from TMainMenuActionBar ?

can't seem to find the AutoHotKey = maManual property to change, nor to find any other property that will cause the right effect.

1

1 Answers

5
votes

(Assuming the question is about TActionMainMenuBar) you would set the AutoHotKeys property through the ActionManager component that the action bar is linked to (through its ActionManager property). Unlike the TMainMenu's AutoHotKeys, this one is a boolean property.

To set the property at design time,

  • Select the 'ActionManager' component on the form
  • Click the ... button on the right side of the ActionBars property in OI.
  • Select your MainMenuBar from the popped up Editing ActionManager1.ActionBars' dialog.
  • Click the ... button on the right side of the Items property in OI, which will launch the Editing ActionManager1.Items dialog
  • Do not select any of the items at this time. Instead, set the AutoHotKeys property to True or False in OI.


At run time you can do:

ActionManager1.ActionBars[0].Items.AutoHotKeys := False;


Note that you might need to re-set the Caption of an Item after toggling AutoHotKeys. I.e. 'F&ormat' -> 'Format'.