View previous topic :: View next topic |
Author |
Message |
zzmyers
Joined: 30 Jun 2008 Posts: 3
|
Posted: Mon Jun 30, 2008 3:39 pm Post subject: Searching in a Treeview |
|
|
I am trying to roll through each node of a Treeview starting from the top level and compare the contents of the node for a search function. However, I have not figured out a simple way to roll through all of the nodes to access the text field to do the comparison. I can go through the top level nodes but I have no way to access the children of those nodes except as a TreeNodeCollection which does not seem to give me access to the the actual TreeNodes which are contained within (they are in variable called _nodes which is private to the module).
I get the idea that I am overlooking something really dumb here, but I can't for the life of me see what it is.
I will admit that I am not a big Windows programmer having done most of my development in Linux and I am not really well up on all the nuances of the Win32 API which is underlying DFL.
If someone can point me in the right direction on this, I will be very grateful.
Steve |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Jul 03, 2008 1:46 am Post subject: Re: Searching in a Treeview |
|
|
TreeView's nodes property gives you a TreeNodeCollection, which has indexing to get the TreeNode`s; and TreeNode has a nodes property of TreeNodeCollection for its sub-nodes, and so on. For example: mytreeview.nodes[x].nodes[y].etc down the tree. TreeNodeCollection has indexing, length property, etc like other collections in DFL. |
|
Back to top |
|
|
zzmyers
Joined: 30 Jun 2008 Posts: 3
|
Posted: Thu Jul 03, 2008 10:41 am Post subject: |
|
|
I knew I was overlooking something simple!
Thanks so much Chris. By the way, love DFL -- it has made Windows development sooo much easier.
Steve |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Jul 03, 2008 4:19 pm Post subject: |
|
|
Don't worry about it, I know the documentation needs much work. The examples help a lot but don't cover everything. bmeck and I have been adding to the documentation a bit more lately, including some examples. Hopefully we can get some minimal done soon enough. Any help is appreciated!
-Chris |
|
Back to top |
|
|
|