all groups > vb.net > january 2005 >
You're in the

vb.net

group:

More treeview woes.


More treeview woes. Bob Hollness
1/31/2005 9:10:21 PM
vb.net:
Hi all.

Is it possible to store some additional information in each node of a
treeview but without displaying it?

i.e. If, for example, my treeview displayed a list of products. But
additionally stored in it is the price of the product. If i clicked on a
node, a messagebox would display the product name and the price. But the
price is only visible upon request.

Thanks

--

Re: More treeview woes. Herfried K. Wagner [MVP]
1/31/2005 9:19:17 PM
"Bob Hollness" <bob@blockbuster.com> schrieb:
[quoted text, click to view]

'TreeNode' has a 'Tag' property that can be used to store additional data
for a node.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Re: More treeview woes. Bob Hollness
1/31/2005 9:43:39 PM
[quoted text, click to view]
Perfect. Thanks.

p.s. Out of curiousity, how long did it take you to get the MVP?
--

Re: More treeview woes. Herfried K. Wagner [MVP]
1/31/2005 11:07:08 PM
Bob,

"Bob Hollness" <bob@blockbuster.com> schrieb:
[quoted text, click to view]

Do you really expect an answer? IIRC, about a half year. Nevertheless,
there is no guarantee that someone who contributes for "exactly a half year"
will be awarded too -- being awarded depends on some other factors too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Re: More treeview woes. Yves Royer
2/1/2005 12:04:17 AM

"Bob Hollness" <bob@blockbuster.com> schreef in bericht
news:e6VgmD9BFHA.2804@TK2MSFTNGP15.phx.gbl...
[quoted text, click to view]

It's indeed possible with the "Tag" Property (like Herfried K. Wagner said)

But I have another question about TreeViews.
Is it possible to switch 2 TreeNodes with each other?

I tried several ways but none of them ended in a way I wanted :-/
The most logical way (in my opinion) is to do it like this:

Dim tempNode as new TreeNode
Dim index as Integer

index = Me.tvSorted.SelectedNode.Index

tempNode = Me.tvSorted.SelectedNode
Me.tvSorted.Nodes(index) = Me.tvSorted.Nodes(index + 1)
Me.tvSorted.Nodes(index + 1) = tempNode

The result of this code is that the 2 TreeNodes switch place like I want it,
but I also get 2 extra TreeNodes, one of each and in the old order.
Example:
A
B
C

Switch A and B with the code above

B
A
A
B
C

This is the result of the code...
The reason of this... I really don't know...

Is it possible what I want to do or do I have to another control to work
with

Thanks in advance

Yves

Re: More treeview woes. google_groups3 NO[at]SPAM hotmail.com
2/1/2005 3:53:13 AM
Of course he expects an answer you idiot. Otherwise he would not have
asked. Stop being such a pompous fuck, even with an MVP you are still
a dimwit. I saw your photo on the MVP website and almost fell off of
my chair laughing.

Spend less time in front of your computer and go out and get a
girlfriend.
Re: More treeview woes. google_groups3 NO[at]SPAM hotmail.com
2/1/2005 8:46:07 AM
You idiot. Of course he expects an answer, otherwise he would not have
asked. Stop being so pompous and take your head from your rear end.
I just saw your photo from the MVP website and almost died laughing.
You should spend less time with computers and go out more to try and
get a girlfriend instead of being an idiot on this group.
Re: More treeview woes. Cor Ligthert
2/1/2005 6:23:20 PM
Hi,

Although I am, absolute not interested what you find of any individual
including me in this newsgroup.

Will you at least not be a chicken and do it anonymous.

You are obviously not somebody passing by.

Cor

Re: More treeview woes. Herfried K. Wagner [MVP]
2/1/2005 6:27:36 PM
<google_groups3@hotmail.com> schrieb:
[quoted text, click to view]

Rules of Conduct
<URL:http://www.microsoft.com/communities/conduct/default.mspx#ECAA>

Show that you are able to learn from your mistakes.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
Re: More treeview woes. Bob Hollness
2/1/2005 10:32:47 PM
[quoted text, click to view]

8-|

--

Re: More treeview woes. google_groups3 NO[at]SPAM hotmail.com
2/2/2005 12:18:49 AM
And you too. The rules say not to make personal attacks. That must
also include pompousness and sarcasm which are both forms of attacks.
You asking if Bob really wants an answer to his question is the same.
So YOU learn and be a little less of an idiot.

oh and telling you to get a girlfriend was not an attack but a
suggestion. It was advice and assistance, which after all, is that not
what this group is about.

I could not care if you have your MVP and I am sure that Bob does not
either. But it makes you NO better. Remember that as it is VERY
important.
Re: More treeview woes. google_groups3 NO[at]SPAM hotmail.com
2/2/2005 12:18:50 AM
And you too. The rules say not to make personal attacks. That must
also include pompousness and sarcasm which are both forms of attacks.
You asking if Bob really wants an answer to his question is the same.
So YOU learn and be a little less of an idiot.

oh and telling you to get a girlfriend was not an attack but a
suggestion. It was advice and assistance, which after all, is that not
what this group is about.

I could not care if you have your MVP and I am sure that Bob does not
either. But it makes you NO better. Remember that as it is VERY
important.
Re: More treeview woes. google_groups3 NO[at]SPAM hotmail.com
2/2/2005 1:01:01 AM
Cor, I am not doing it anonymous. My name given to me by my mother is
google_groups3. That is why I have the email address that I do.
You may think that my name is silly, but no sillier than yours.
Re: More treeview woes. Cor Ligthert
2/2/2005 10:09:30 AM
I am from a country where there is by law no difference between sexes.

If a man has a friend or a girlfriend does not matter, however the way you
describe it now can mean that the law says in my country that you are
discriminating.

Therefore, give your opinion not anonymous. Be not a chicken show who you
are.

With that, nothing said about sexual behavior from Herfried, because I don't
know that and let everybody in the world free for his own opinion about that
law in my country.

Cor

Re: More treeview woes. Herfried K. Wagner [MVP]
2/2/2005 1:00:36 PM
<google_groups3@hotmail.com> schrieb:
[quoted text, click to view]

Let's continue the discussion when you have left puberty...

EOT

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
AddThis Social Bookmark Button