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

How to store a hidden value in a tree node ?

P: n/a
Hello to one and all,

Is it possible to store a string value in a tree node, but this value
is not for display, it's for a tool tip. If not, what are my options,
to create a shadow tree which is invisible?

tia.
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Lucio,

Every from control inherited class has a tag property.
Know that it is an object so you have to use "ToString" in it.

I saw that Ken provided you already the sample on our website.
The only thing is than that you have to change
nd.Text to nd.Tag.ToString

(and fill the tags properly of course)

http://msdn.microsoft.com/library/de...sstagtopic.asp

It is in my opinion excellent for your problem

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
<Lucio H> schrieb:
Is it possible to store a string value in a tree node, but this value
is not for display, it's for a tool tip. If not, what are my options,
to create a shadow tree which is invisible?


\\\
Dim tn As TreeNode = ...
tn.Tag = "Bla"
..
..
..
Dim s As String = DirectCast(tn.Tag, String)
///

--
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
> \\\
Dim tn As TreeNode = ...
tn.Tag = "Bla"
.
.
.
Dim s As String = DirectCast(tn.Tag, String)
///


Mon cher MVP's
Finally it is working, one small problem remains, if I leave the mouse over
an item the entire tooltip will redraw every 5 seconds with a visible
flicker
effect, any ideas? Also, I am puzzled by the design time help of the Tag
property, because normally I receive a small popup box with all the possible
methods/properties of an object, but with Tag I only receive GetType. For
example, ToString, which Cor suggested, does not seem to be included
as a possible method, why is that?
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.