HeartWare 1 Posted February 7, 2022 Is it possible to control the location of a Sub-Menu off a TPopupMenu? Ie. A TPopupMenu has an item that is a sub-menu with items. I want to control where this sub-menu pops up (normally, it pops up to the right, but I want it to pop up on the left due to screen design). Or is it possible to not have the sub-menu being auto-opened with mouse hover over the sub-menu item (ie. you have to click the sub-menu item in order to open the entire sub menu)? Share this post Link to post
PeterBelow 238 Posted February 8, 2022 23 hours ago, HeartWare said: Is it possible to control the location of a Sub-Menu off a TPopupMenu? Ie. A TPopupMenu has an item that is a sub-menu with items. I want to control where this sub-menu pops up (normally, it pops up to the right, but I want it to pop up on the left due to screen design). Or is it possible to not have the sub-menu being auto-opened with mouse hover over the sub-menu item (ie. you have to click the sub-menu item in order to open the entire sub menu)? The position of the submenus is controlled by Windows (assuming we are talking about a VCL app), by default it pops up on the right side, unless there is insufficient space available on the screen on that side. I don't know of a way to control that. What you could do is to implement each submenu as a separate TPopupMenu and pop it up manually from the OnClick event of the "parent" menu item. Unfortunately it is not trivial to determine the screen position of an open menu item... Share this post Link to post