Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6047
  • Last Modified:

Treeview Tutorial

Greetings experts,

I was wondering if anyone could provide me with some tutorials (both in depth and basic) which detail how to use the Treeview component. Although i have no problem using this component, i do get confused on the usage of  add, addchild, addchildfirst and so on.
I am looking for a tutorial which shows me the correct methods for adding nodes, finding nodes, adding a child to a particular node, aswell as removing a child from a particular node (or deleting a whole node entirely).
I have found certain articles, but i would like to read more :)

Kind Regards
  • 2
2 Solutions
GreenandroidAuthor Commented:
Oh, i also forgot to add that i need to find a way of adding a child to a parent node, by just knowing the caption that the parent node has. As an example of this, i would need to add a child node with the caption 'test1' to the parent node with the caption 'parent'



This one has some excellent tutorials on using the TTreeView...


And here are a couple more you can try...

The problem you will get by doing that with the caption... is that when you will have two captions alike... (test1 and test1) The code you can write from the tutorials will end up adding the child to the first test1.. if you write a code for finding the caption in the tree.
It's a little delicate this one.
Except...If you assign a unique code to each node.
Well a lot of words here... and above you have the tutorials.
Good luck
GreenandroidAuthor Commented:
Thanks for your help folks.

Much appreciated.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now