simple tooltip
Posted: 13 Feb 2008 9:36
Here is a small project that shows a really simple tooltip class. There are no timers as in the pfc's vpiToolbar class.
The attached project has a form that draws two rectangles. When the mouse is over a rectangle, a tooltip is shown with some text. The tooltip moves with the mouse.
The tooltip is a modeless dialog that is created when the form is created. It is visible when the mouse is over a rectangle, and invisible when not.
The weaknesses are:
- if the mouse enters the tooltip dialog, the tooltip will not move. Which is why I have put in the Yoffset.
- there is a delay in repainting the form when the tooltip moves quickly.
Both these problems could probably be overcome with timers or delays.
Built with Vip7103
Steve Lympany
The attached project has a form that draws two rectangles. When the mouse is over a rectangle, a tooltip is shown with some text. The tooltip moves with the mouse.
The tooltip is a modeless dialog that is created when the form is created. It is visible when the mouse is over a rectangle, and invisible when not.
The weaknesses are:
- if the mouse enters the tooltip dialog, the tooltip will not move. Which is why I have put in the Yoffset.
- there is a delay in repainting the form when the tooltip moves quickly.
Both these problems could probably be overcome with timers or delays.
Built with Vip7103
Steve Lympany