开发者

delphi 2009 accelerators

How to remove the Accelerators from T开发者_StackOverflow中文版MainMenuActionBar ?

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


(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'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜