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
125
UltraCombo (v4.3) Behaves Differently in .NET 3.5
posted

In the original .NET 1.1 implementation of my winforms app, the users didn't like that the mouse scroll wheel scrolled both the form and the active combo box...  I resolved that easily with the following code, which just sets focus to the next control when the scoll wheel is NOT dropped down:

----------------------------------------------------------------------------------------------------------

Private Sub DMVComboBox_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseWheel

    If Me.IsDroppedDown Then

        'ignore

    Else

        Me.SetFocusToNextControl(True)

    End If

End Sub

----------------------------------------------------------------------------------------------------------

That was simple and worked great, right up until we upgraded the app to .NET 3.5...  Now there's a new behavior:  Before the scroll of the mouse wheel sets focus to the next control, it first selects the NEXT value in the combo box list!  Not good...  I've tried several hacks to either restore the previous value before setting focus to the next control OR to disable the mouse wheel when the combo box is NOT dropped down...  I'm going in circles now, so trying this...

Any suggestions appreciated...

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    jahooper said:
    the mouse scroll wheel scrolled both the form and the active combo box

    This is clearly a bug and it was fixed a long time ago. So my first suggestion to you would be to upgrade to the latest version. The version you are using is almost 7 years old.

    If the combo is scrolling before the MouseWheel event fires, then I can't think of any way around that, unless you can find some other event that does fire before the scrolling occurs. But I don't think there is one.

Children
No Data