Re: Tooltips and MouseMove event

Peter Osucha <[email protected]> Mon, 9 Jul 2007 09:51:46 -0400
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <[email protected]>
MouseHover() won't do it.  It only fires once for the _canvas.  Looks
like I have to use the MouseMove() event.  I'm surprised at the number
of times this event fires before it seems to 'settle down'.

Peter

-----Original Message-----
From: Discussion relating to the specifics of the C# and Managed C++
languages [mailto:[email protected]] On Behalf Of Peter
Osucha
Sent: Monday, July 09, 2007 9:40 AM
To: [email protected]
Subject: [DOTNET-CX] Tooltips and MouseMove event

I am drawing an array of circles, boxes, etc., on a graphics object
associated with a panel control.  The class I use to do this is called
'Cartridge'.  So one of the items in the constructor of the Cartridge
object is a panel control (though technically it could be any control to
which I can get a reference to a graphics object) I am referring to as
_canvas.

=20

Anyway, I have realized that it would be very beneficial to provide
tooltips when the mouse hovers over some of the shapes I have drawn.  To
try to implement this, I have created a ToolTip object in the Cartridge
class and have attempted to set it in two places - first, an event
handler connected to the _canvas.MouseMove() event; second, in an event
handler connected to the _canvas.MouseHover() event.  Neither produces
the desired effect.

=20

The MouseMove() event seems to fire at intervals of about 500 ms
regardless of whether or not I am moving the Mouse over the _canvas.
The MouseHover() event never (very, very seldom) seems to fire.

=20

Any suggestions on what I can do to implement this tooltip
functionality?

=20

Peter

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor=AE  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com