Erikvandervelde
Member
- Joined
- May 23, 2003
- Messages
- 11
Hi there!
Im writing a usercontrol wich contains multiple buttons which I draw usering GDI+.
It arent actually buttons (controls) but i just draw them.
Now i want to show a tooltip if the mouse moves over a button.
I tried to do this on the mousemove event:
Protected Overrides Sub OnMouseMove(ByVal e As system.Windows.Forms.MouseEventArgs)
Dim MyButton As OutlookBarButton
Me.MyTooltip.RemoveAll()
For Each Button In Me.buttons
If MyButton.Bounds.Contains(e.x, e.y) Then
Me.MyTooltip.SetToolTip(Me, MyButton.Title)
End If
Next
End sub
But this wont work.
The control doesnt show a tooltip at all.
How should I do this?!
Please understand that MyButton is NOT a control, but just a class.
So Me.mytooltip.SetToolTip(MyButton, MyButton.title) is not possible!
I hope someone can help me out!
Erik
Im writing a usercontrol wich contains multiple buttons which I draw usering GDI+.
It arent actually buttons (controls) but i just draw them.
Now i want to show a tooltip if the mouse moves over a button.
I tried to do this on the mousemove event:
Protected Overrides Sub OnMouseMove(ByVal e As system.Windows.Forms.MouseEventArgs)
Dim MyButton As OutlookBarButton
Me.MyTooltip.RemoveAll()
For Each Button In Me.buttons
If MyButton.Bounds.Contains(e.x, e.y) Then
Me.MyTooltip.SetToolTip(Me, MyButton.Title)
End If
Next
End sub
But this wont work.
The control doesnt show a tooltip at all.
How should I do this?!
Please understand that MyButton is NOT a control, but just a class.
So Me.mytooltip.SetToolTip(MyButton, MyButton.title) is not possible!
I hope someone can help me out!
Erik