Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
480
How do you locate a tool item from PopupMenuControlTrusted
posted

I have a menu that has so many menu items in the menu that there are scroll widgets that appear at the top & bottom of the menu. I'm using TestPartner to test the screen and choosing the menu item from the Main menu on the form TestPartner is returning the PopupMenuControlTrusted object for the popupmenu. Using the PopupMenuControlTrusted  obect I need to be able to iterate through the tool items to find the item a specific item and bring it into view so that TestPartner can then click it.

The class used to create the menu is the UltraToolbarsManager

Can you get the parent tool that opened the context menu from the PopupMenuControlTrusted?

 

Parents
  • 44743
    posted

    It doesn't look like there is an easy way to get from the PopupMenuControlTrusted to the menu which opened it. However, if you have one of the tool's on the menu, you can go to the Owner of that tool to get the menu. You can also use the UltraToolbarsManager.ToolFromPoint method to find out which tool is under the mouse on the menu. Also, you can use ToolBase.BringIntoView() to bring any tool into view if it is scrolled out of view on the menu.

Reply Children