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

x
  • 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
Jay
0
Greenandroid
Asked:
Greenandroid
  • 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'

Thanks
0
 
mwbowmanCommented:

Jay,

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

    http://delphi.about.com/b/a/009212.htm

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

    http://users.iafrica.com/d/da/dart/zen/Articles/TTreeView/TTreeView_Main.html
    http://www.delphi-central.com/tutorials/FindTreeViewNode.aspx
0
 
calinutzCommented:
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
0
 
GreenandroidAuthor Commented:
Thanks for your help folks.

Much appreciated.
0

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