"Bob Hollness" <bo*@blockbuster.com> schreef in bericht
news:e6**************@TK2MSFTNGP15.phx.gbl...
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
--
I'll have a B please Bob.
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