Mouse Over ToolTip in a tree view


G

Guest

My goal is to accomplish the tooltip functionality for all the neodes in a
tree view and i have the following three Events in my C# application.

Name of my TreeView Control (AITreeView)

1) AITreeView_MouseDown(object sender, MouseEventArgs e)

2) AITreeView_MouseUp(AITreeView_MouseDown(object sender, MouseEventArgs e)

3) AITreeView_Click(AITreeView_MouseDown(object sender, MouseEventArgs e)

With this i am able to accomplish the goal and the tooltip gets displayed
for each node.
Bu the problem that i am running into is when i put the mouse on a
particular node it keeps flickering (ToolTip gets displayed) and when i move
the mouse to the next node in the tree the previous node gets disapeared. It
appears back again when i move the mouse out of the tree view node list.

I can't attach the Screen shot for the problem and I am unable to debug this
too, because if i put a break point in one of these events it always goes in
a recursive mode.
 
Ad

Advertisements

S

Steven Nagy

Why not just use the standard tooltip functionality and have its
message changed dynamically depending on which node is currently
selected?
Thats how I normally do it and seems to work fine, no flickering or
anything.

Steven Nagy
 
G

Guest

I am using the standard tooltip functionality which comes in built in
VS.NET, inspite of this we are getting this problem.
 
S

Steven Nagy

I don't understand why you are worrying about mousedown and up and
click events.
Do you want the tooltip shown as per the normal mouse over for a couple
seconds, or you want it to be shown when the user actually clicks on
the node?

You could use GetChildAtPoint to continually retreive which node the
mouse is over, and change the tooltip text immediately. Then if the
user holds the mouse still and the tooltip shows, it has already been
updated with the correct text for this node.
 
G

Guest

Let me give you more background..
There is a configuration file which consists of list of servers on which web
services are exposed and the application reads through that configuration
file and pings all the servers and reads through the wsdl file and identifies
all the web services and web methods. Once this is accomplished it bind all
the information into the tree view as a hierarchical view.

I use GetChildAtPoint to continually retreive which node the mouse is over,
and change the tooltip text immediately. It displays the Tooltip text as per
the requirement but for some reasons it constantly flickers and as i move
over the mouse (either up or down) to the next node in the tree the previous
node gets disapeared. It appears back again when i move the mouse out of the
tree view node list.

One more important behaviour which i have observed, the same code works fine
in Visual Studio 2003 but when i migrate that to Visual Studio 2005 it has
this flickering problem. I guess it might be some bug (??) in VS 2005.
 
Ad

Advertisements

S

Steven Nagy

Ah ok. I haven't migrated to 2005 yet so I can not recreate your
problem sorry.
Maybe someone else here can help you out.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top