ToolTip Popup Event never raised

B

Ben

Hello,

I've been trying to implement a custom OwnerDraw ToolTip that will
display when the mouse is hovering over a TreeNode. So far I have the
ToolTip coming up and drawing properly through my custom ToolTip.Draw
Handler, but only a small part of the ToolTip is displayed. This
appears to be because the ToolTip.Popup Handler that I have created to
set the correct Bounds is never executed.

My implementation currently works like this:

(MyToolTip is a class that inherits from the ToolTip class and adds a
couple of data fields.)

1.) TreeView.NodeMouseHover Event is raised. The handler assigns the
Tag information from the Node that is hovered over to the MyToolTip
instance.

2.) MyToolTip.Show is called by the NodeMouseHover Event Handler.

3.) MyToolTip.Draw event draws the custom ToolTip based on the data
that has been assigned to MyToolTip from the Node's Tag field.

According to the documention that comes with the .NET Framework 2.0
SDK, and MSDN, the ToolTip.Popup Event is supposed to be raised after
calling ToolTip.Show. This is not happening so I'm stuck with a broken
ToolTip and wondering why.

If anyone has information that can help me resolve this issue, I would
be very grateful.

Thanks,
Ben
 
Joined
Jan 22, 2013
Messages
1
Reaction score
0
Well I found the reason why this happens, but have no clue how to fix it.

To test my theory, on a tree view control with root nodes and tree nodes...

add a custom tool tip control to the tree...

move the mouse over the tree and nodes... (the tree catch event could be mouse over or hover) you will notice that sometimes the tool tip pop up event is called.

add a beep to the pop up event in the custom tool tip... SystemSounds.Beep.Play();

now expand the tree view so there is plenty of white space between the nodes and the edges of the tree control... (I used a Split Container, with tree view with Dock fill)

move the mouse parallel to the nodes over the white space in the tree control... lots of beeping... now move the mouse over the actual tree nodes (root or children)... no beeping.

Why... I haven't a clue. I have spent two days chasing this ghost. I think it has to do that the actual mouse move over the nodes have stolen the tool tip's grasp on which control has the ball.

I wish for a solution to this.... goggled till the cows came home!

Pablo
 

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