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 theActionBarsproperty in OI. - Select your MainMenuBar from the popped up
Editing ActionManager1.ActionBars'dialog. - Click the
...button on the right side of theItemsproperty in OI, which will launch theEditing ActionManager1.Itemsdialog - Do not select any of the items at this time. Instead, set the
AutoHotKeysproperty 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'.
加载中,请稍侯......
精彩评论