FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Searching in a Treeview

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
zzmyers



Joined: 30 Jun 2008
Posts: 3

PostPosted: Mon Jun 30, 2008 3:39 pm    Post subject: Searching in a Treeview Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Thu Jul 03, 2008 1:46 am    Post subject: Re: Searching in a Treeview Reply with quote

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
View user's profile Send private message
zzmyers



Joined: 30 Jun 2008
Posts: 3

PostPosted: Thu Jul 03, 2008 10:41 am    Post subject: Reply with quote

I knew I was overlooking something simple! Embarassed

Thanks so much Chris. By the way, love DFL -- it has made Windows development sooo much easier.

Steve
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Thu Jul 03, 2008 4:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group