Thank you for your help Milko, it works fine !
Hello Catherine,
Your issue appears in a result of normal event flow in Windows Forms. More specifically what happens when you click on your UltraExpandableGroupBox (gb2) while it is not on top of your panel (panel1) is:
On MouseDown event gb2 gets focus and fires ScrollToControl method of its parent container – panel1;
ScrollToControl method of panel1 calculates the scroll offset to gb2 and depending on this value adjust the scrolled position of gb2 – effectively puts the gb2 on top of the panel1;
On MouseUp event nothing happens. This event is fired with mouse coordinates different from gb2’s expansion indicator position, as gb2 is already scrolled.
What you can do is to override ScrollToControl method of UltraPanel in your custom class derived from UltraPanel class. In this custom class you can make ScrollToControl method to return the current position of UltraExpandableGroupBox.
Please check attached demo solution and tell me is this is what you are looking for or if I am missing something.