0
Reply

Difficulty with TreeViews and ToolTips

B Tucker

B Tucker

May 24 2006 10:33 AM
1.6k
Good morning all.~ I'm currently using a TreeView control in VS2k5, along with a ToolTip. I'm using the work around for displaying the ToolTip based on where the mouse's position is. It allows me to specify the intervals and text dynamically over the TreeView, instead of just setting the ToolTipText of each node. Here's the code from the work around: // get the node under the mouse's location\n TreeNode node = nlFavorites.GetNodeAt(e.X, e.Y); // if there is a node under the mouse... if (node != null) { // ...set the index from the TreeView of the node int currentNodeIndex = node.Index; // if the node has changed... if (currentNodeIndex != m_oldNodeIndex) { // ...update the current node's index m_oldNodeIndex = currentNodeIndex; // if the ToolTip is active... if (m_toolTip != null && m_toolTip.Active) { // ...turn it off so that it can be refreshed m_toolTip.Active = false; } // set the ToolTip's text to the node's ToolTipText. m_toolTip.SetToolTip(, node.ToolTipText); // show the ToolTip m_toolTip.Active = true; } } The problem that I am having is that even though I set the 'ShowNodeToolTips' to false, a small ToolTip with the node's text appears when moving between nodes. Any ideas?