Adding Data to TreeView Nodes

Woinowski

Active Member
Licensed User
Hi,

I'd like to be able to add data (a string, number or even arbitrary variable type) to each tree node.

As an example: imagine a notepad with a tree structure (there's a lot of those out there, just an example).

You would be able to navigate through the tree to your notes and each node could contain a note(text string).

Currently, I can only think of awkward workarounds (e.g., simulating a tree with the same structure in an ArrayList).

Just using the Node.Text member is not the correct idea: In the tree view I would only want to show titles of the notes/nodes.
Jens
 
Last edited:

Woinowski

Active Member
Licensed User
Addition: Look at Visual Studi

To make my idea clear:

In visual studio the TreeView-Node Class has a member "Tag" for user defined data (in C#) That's just what I am looking for....
 

Woinowski

Active Member
Licensed User
And it is not possible to add something similar, even a simple string tag, to the B4PPC library Node class?
 

Woinowski

Active Member
Licensed User
Cool. I'm looking forward to that. Currently I have found a workaround:

I use a tree without images. The image index can be used to reference an item in an arraylist :)
 
Top