DomainUpDown OnMouseEnter

false74

Well-known member
Joined
Aug 4, 2010
Messages
76
Programming Experience
Beginner
Currently have created/extended the DomainUpDown class hoping I would be able to add one simple feature: I was hoping to be able to show a tooltip when the user mouses over the control that would show the next and previous item in the list. However the DomainUpDown class does not have a mouseenter event and overriding the mouseenter method does not seem functional. Is there something I am missing or do I just need to create my own MouseEnter event?

VB.NET:
Expand Collapse Copy
    Private tips As New ToolTip With {.AutomaticDelay = 0, .AutoPopDelay = 0, .InitialDelay = 0, .ShowAlways = True, .ForeColor = Color.WhiteSmoke, .BackColor = Color.Black}

    Protected Overrides Sub OnMouseEnter(ByVal e As System.EventArgs)
        MyBase.OnMouseEnter(e)
        Console.WriteLine("list entered") 'testing purposes, never is printed on mouse enter
        tips.SetToolTip(Me, "Up = " & Me.Items(Me.SelectedIndex - 1).ToString & vbLf & "Down = " & Me.Items(Me.SelectedIndex + 1).ToString)
    End Sub
 
OnMouseEnter is functional. MouseEnter event was hidden by UpDownBase.
You'll get ArgumentOutOfRangeException exceptions though when first or last item is selected.
 
Back
Top