Submenu wrong position in Delphi application

倖福魔咒の 提交于 2019-12-23 11:49:09

问题


My application is written in delphi. For some reason the main menu does not behave anymore like it did until yesterday (I probably touched some property without knowing). Now when I click on a menu item with sub-items, though the arrow is located to the right, the submenu keeps opening to the left.

What is the reason and how do I restore it back?


回答1:


As revealed in the comments to the question, this is not programming related. There's a setting that does this in tablet pc settings in control panel. The reason for the setting is, when one is using a pen or the like with the right hand, sub menus, if opened to the right of their parent menu, are obscured by the pen.




回答2:


I had the same problem and it had nothing to do with my "touch screen" or other pc tablet related settings I found out by changing some features of the MainMenu of type TMainMenu: Just set the "OwnerDraw" feature to False and "ParentBiDiMode" to true So if your parent view is already fine this MainMenu (submenu) will conform to its parent. I did it 100s of times and it worked for me



来源:https://stackoverflow.com/questions/12850176/submenu-wrong-position-in-delphi-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!