开发者

MainMenu control not displaying underlining when using & and pressing ALT

开发者 https://www.devze.com 2023-03-15 03:22 出处:网络
I\'m using a MainMenu control (n开发者_Go百科ot MenuStrip) in a WinForm. In design view I can put an & in the text field and it will display the underlining but when the program is running and I p

I'm using a MainMenu control (n开发者_Go百科ot MenuStrip) in a WinForm. In design view I can put an & in the text field and it will display the underlining but when the program is running and I press ALT it does not appear.

Also for some reason the '&' character is actually drawn (e.g. &File) to the display when used on the top level.

Has anyone had this problem before and solved it? I've searched around and haven't found a solution except for drawing my own but this seems like a problem that should be solvable since it's a built in feature of the control.

Thanks


Is the Form.MainMenu set to your MainMenu?

For SubMenuItems also check the relevant windows settings: In WinXp it is under Display Properties / Appearance / Effects on XP


make sure the items in the menu have the properties ShowShortCutKeys = true.

0

精彩评论

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