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
945
UltraPeekPopup is preventing mouse click while it's displayed
posted

I'd like to use UltraPeekPopup in a more-passive manner.  When it pops up and then I try to click on a button or anything else on my form, the first click makes the UltraPeekPopup disappear and it doesn't do the button click.  It takes another click after that.  Is there a way to prevent this from happening?  I.e. if the UPP is displayed and I click a control on the form like a button, the button click will succeed?

Parents
No Data
Reply
  • 34830
    Verified Answer
    Offline posted

    Hello Rory,

    I have been investigating into the behavior you are seeing, and at the moment, the only way to achieve this is to do something rather hacky, as the behavior you are seeing is expected. The UltraPeekPopup was designed to act more like a ComboBox, where you will see if you open the drop-down and try to click an external Button, the Button’s click event will not fire.

    That said the hacky thing that you can do is the following, where the “button1” element is the “owner” passed into the UltraPeekPopup’s Show method:

    MethodInfo info = typeof(DropDownManager).GetMethod("GetManager", System.Reflection.BindingFlags.NonPublic | BindingFlags.Static);
    DropDownManager manager = info.Invoke(null, new object[] { button1 }) as DropDownManager;
    
    FieldInfo info2 = typeof(DropDownManager).GetField("eatMouseMessageOnAutoCloseup", BindingFlags.NonPublic | BindingFlags.Instance);
    info2.SetValue(manager, false);

    I am also attaching a sample project to demonstrate.

    Please let me know if you have any other questions or concerns on this matter.

    PeekPopupButtonClickTest.zip

Children