Discussion:
Tooltips and MouseMove event
Peter Osucha
2007-07-09 13:39:30 UTC
Permalink
Peter Osucha
2007-07-09 13:51:46 UTC
Permalink
Peter Osucha
2007-07-09 15:31:16 UTC
Permalink
Ryan Heath
2007-07-09 16:39:08 UTC
Permalink
Perhaps you should only set the tooltip to a value when it differs
from the tip already registered with the control.

if ( ttt != _tt.GetToolTip( panel1))
_tt.SetToolTip ( panel1, ttt );

Ofcourse now you can not use the tickcount in your tooltip anymore ;)

HTH
// Ryan

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Peter Osucha
2007-07-09 16:51:50 UTC
Permalink
Fabian Schmied
2007-07-12 07:05:00 UTC
Permalink
Hi Peter,

> 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.

Have you already solved this problem? If no, it might be useful if you
could post some code of what you're doing; ideally a small, complete
sample.

> 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.

This seems very strange, how do you determine how often these events
fire? Are you tracing something to the debug output or are you just
basing this on the fact that your tooltip doesn't appear? If the
latter, it's probably a tooltip problem rather than a mouse event
problem.

Fabian

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Peter Osucha
2007-07-12 10:58:28 UTC
Permalink
Eames, Andrew
2007-07-12 12:56:02 UTC
Permalink
Peter Osucha
2007-07-12 13:08:23 UTC
Permalink
Peter Osucha
2007-07-31 14:02:43 UTC
Permalink
John Brett
2007-07-31 14:29:19 UTC
Permalink
On 31/07/07, Peter Osucha <***@proteindiscovery.com> wrote:
> I am showing a small form 'TimePanel' (which is a FixedToolWindow) as a
> TopMost window in response to a double-click on a status bar panel of my
> main app form (MainAppForm). The form containing the status bar holds a
> class level variable '_timePanel' referencing the TimePanel form.
>
> In the constructor for MainAppForm, I instantiate the _timePanel object
> - but I don't show it. If the user double clicks on the appropriate
> status bar panel, I check to make sure the _timePanel reference isn't
> null and then I call _timePanel.Show() to show the form.
>
> The problem... if the user closes the _timePanel form, and then double
> clicks on the status bar panel, an error can occur because the
> _timePanel variable is being disposed.
>
> How should I be creating this functionality so that this error doesn't
> occur?

Override the OnClosing method of the timePanel, cancel the close and hide
the form instead.

John

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Fellows, William B.
2007-07-31 14:30:18 UTC
Permalink
Peter Ritchie
2007-07-31 14:16:23 UTC
Permalink
How could your _timePanel variable be disposing while the user double-
clicks a status bar panel if the dispose of _timePanel was the result of
user interaction?

Do you mean _timePanel is disposed when the user double-clicks the status
bar panel?

If the time panel is an application-wide shared resource (i.e. a class
member not an instance member) then you might want to override the time
panel's closing event and just hide the panel instead of letting it
close. Then, you could ensure you dispose that panel when the main window
closes. Although, if it's dependant on the main window I would question
why it's not an instance member instead of a class member.

-- Peter

On Tue, 31 Jul 2007 10:02:43 -0400, Peter Osucha
<***@PROTEINDISCOVERY.COM> wrote:

>I am showing a small form 'TimePanel' (which is a FixedToolWindow) as a
>TopMost window in response to a double-click on a status bar panel of my
>main app form (MainAppForm). The form containing the status bar holds a
>class level variable '_timePanel' referencing the TimePanel form.
>
>In the constructor for MainAppForm, I instantiate the _timePanel object
>- but I don't show it. If the user double clicks on the appropriate
>status bar panel, I check to make sure the _timePanel reference isn't
>null and then I call _timePanel.Show() to show the form.
>
>The problem... if the user closes the _timePanel form, and then double
>clicks on the status bar panel, an error can occur because the
>_timePanel variable is being disposed.
>
>How should I be creating this functionality so that this error doesn't
>occur?

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Peter Osucha
2007-07-31 14:39:20 UTC
Permalink
Loading...