Submenu wrong position in Delphi application

2019-06-22 18:01发布

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.

enter image description here

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

标签: delphi menu main
2条回答
我只想做你的唯一
2楼-- · 2019-06-22 18:37

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.

查看更多
狗以群分
3楼-- · 2019-06-22 18:45

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

查看更多
登录 后发表回答