Hey friends, I am very happy that u people r helping mee in many ways with ur solutions.
Thanks a lot.
I have another question for today. As, i am new to C# every thing is question for me.
can anyone help me how to create a tooltip for the childnode for treeview, where the tooltip text comes from the database.
And How to add a contextmenu. By selecting say for example create, i should be able to enter new values and foe edit i need to display the default values in the other pane of the same form.
Thanks a lot friends for ur valuable help once again.
MSLPosted Apr 28, 2008, 1:54 AM
thank u so much Scott for ur help.
plz help me with the context menu as well. :)
Scott LyslePosted Apr 26, 2008, 7:25 AM
It would not be a good idea to load a tooltip from a database source; even if you cut the delay time for displaying the tooltip down to nothing that will still likely give you some trouble. I would suggest that you put the tooltip text into the tag property of the treenode as you add the nodes to the tree and then recover the tag value when you want to display it as a tooltip.
You can treeview node NodeMouseHover event to do this:
private void treeView1_NodeMouseHover(object sender,
TreeNodeMouseHoverEventArgs e)
{
toolTip1.SetToolTip(treeView1, e.Node.Tag.ToString());
}