Is there a way to force always show mnemonics in menus?

前端 未结 2 448
慢半拍i
慢半拍i 2021-01-07 10:16

I am making use of ContextMenuStrip in my program and apparently, it wont show its shortcut keys (mnemonics, those that should be shown as underlines under letters preceded

相关标签:
2条回答
  • 2021-01-07 10:27

    That is an operating system setting:

    Control Panel\All Control Panel Items\Ease of Access Center\Make the keyboard easier to use\Make it easier to use keyboard shortcuts\Underline keyboard shortcuts and access keys.

    0 讨论(0)
  • 2021-01-07 10:37

    Change the way the context menu is invoked. Don't show it manually, instead use something like:

    textBoxSomething.ContextMenuStrip = yourContextMenuStrip;
    

    In this case, if the user right-click on the text box (or other control you use), he will get the menu without mnemonics. But if he uses the keyboard context-menu-button to show the context menu, the mnemonics will be shown.

    0 讨论(0)
提交回复
热议问题