Page 1 of 1

simple tooltip

Posted: 13 Feb 2008 9:36
by Steve Lympany
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

Posted: 14 Mar 2009 16:55
by Steve Lympany
Hi,
Here is an updated tooltip for VIP7.2 (7201), using the new popupwindow

One tooltip moves with the mouse, the other pops up but remains in place and then disappears

It was a bit tricky to get the popup to appear in the right places!

Steve

Posted: 10 Apr 2009 16:54
by Steve Lympany
Hello again,
Attached is a project using a new tooltip.

adl_tooltip is now a class that doesn't create objects, which make more sense.

Steve