C# Winform: How to display tooltips just below treeview node
T.Zacks
3,996
Reputation points
I am trying to show tooltips just below treeview node but it is not positioned properly. here is a screen shot.
this is my code which is showing tooltips on the node when position mouse over treeview node. this tooltip cover actual node on which mouse is positioned. please guide me to place tooltips under the hover node.
string tooltipmsg = "Please check." + Environment.NewLine + "Yellow background lineitem does not exist.";
private void tvCsmTuner_MouseMove(object sender, MouseEventArgs e)
{
TreeNode currentNode = this.tvCsmTuner.GetNodeAt(e.X, e.Y);
if (null != currentNode)
{
if(currentNode.BackColor==Color.Yellow)
{
this.toolTip1.SetToolTip(tvCsmTuner, "Please check."+Environment.NewLine+"Yellow background lineitem does not exist.");
//toolTip1.Show(tooltipmsg, tvCsmTuner, tvCsmTuner.PointToClient(new Point(e.Location.X, e.Location.Y)));
}
else
{
this.toolTip1.SetToolTip(tvCsmTuner, "");
}
}
}
I just want to place tooltips under the node which is not happening by the above code. thanks
Developer technologies C#
11,568 questions
Sign in to answer