By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

TreeViewNode ToolTip

P: n/a
Dear all,
is it possible to assign a tooltip to a .NET treeview node?
Thank you for your time.
Boni
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I don't think you can directly assign tooltip info to individual nodes. So
you will have to create a class that inherits TreeViewNode class. This child
class will have a variable for the ToolTip(string). You will need to create
these specialised nodes and add them to your treeview.

Hope this helps.

Here is some sample code

///
Public Class tvwTooltip
Inherits TreeNode

Public tvwToolTip As String

Sub New()
MyBase.New()

End Sub
End Class
'This goes in your form where you are adding the nodes to the treeview
Dim tvwNode As tvwTooltip

tvwNode = New tvwTooltip
tvwNode.tvwToolTip = "Parent Node"
tvwNode.Text = "Parent"
Me.TreeView1.Nodes.Add(tvwNode)
\\\
Nov 21 '05 #2

P: n/a
"Boni" <oilia@nospam> schrieb:
is it possible to assign a tooltip to a .NET treeview node?


<URL:http://groups.google.de/group/microsoft.public.dotnet.framework.windowsforms/msg/1f55fd4934524f0d>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
Thanks Herfried,
It worked.
I will allow me to make a .NET feature request. In general I am impressed
how powerfull .NET classes are (and how much more productive the .NET
programming is relative to native coding), but sometimes I am wondering that
such simple things are not there. I.e. why not just provide tooltip propery
for all Forms controls? Or why not make a "build-in" checkbox column type
for datagrids and listviews?
In this case no "workaround" would be needed.
Thanky you very much for all your answers to my posts, you help me very much
all the time.
With best regards,
Boni

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im Newsbeitrag
news:ei**************@TK2MSFTNGP09.phx.gbl...
"Boni" <oilia@nospam> schrieb:
is it possible to assign a tooltip to a .NET treeview node?


<URL:http://groups.google.de/group/microsoft.public.dotnet.framework.windowsforms/msg/1f55fd4934524f0d>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

P: n/a
"Boni" <oilia@nospam> schrieb:
I will allow me to make a .NET feature request. In general I am impressed
how powerfull .NET classes are (and how much more productive the .NET
programming is relative to native coding), but sometimes I am wondering
that such simple things are not there. I.e. why not just provide tooltip
propery for all Forms controls? Or why not make a "build-in" checkbox
column type for datagrids and listviews?
In this case no "workaround" would be needed.


In .NET 2.0 'TreeNode' will have a 'ToolTipText' property.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.