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
310
How To Display a DropDownMenu
posted

How do I programatically display a DropDownMenu when I am NOT using an Infragistics Control?

In other words, I have a regular Windows Treeview, and I have code in the MouseUp event.  When I handle the MouseUp Event, I want to display an Infragistics PopUpMenu.

This is the code:

PopupMenuTool contextMenu = ultraToolbarsManager1.Tools["Context1"] as PopupMenuTool;

contextMenu.DropDown();

This gives an error of "Can't drop down a root tool."

How do I display the PopupMenu?

Greg

Parents
  • 44743
    Verified Answer
    posted

    Use the following method defined on toolbars manager:

    public void ShowPopup( string popupToolKey, Control owner, Point screenPoint )

    Passing in the key of the tool, the tree, and the location of where the popup should open. If you want the popup shown at the current mouse location, use this method instead:

    public void ShowPopup( string popupToolKey, Control owner )

Reply Children
No Data