Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search for Values in Treeview
Message
From
25/04/2002 12:28:15
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00648702
Message ID:
00649190
Views:
12
Hi Nick.

>My user enters a search value, how can I look for that value in a treeview that I have populated and then expand that particular node in the treeview highlighting the found value?

I suggest having the TreeView be a "front end" for a cursor. You could store both the text and the key for the node in the cursor, and do a SEEK when the user enters the search value. When you find the record in the cursor, you have the key for the node so you can easily address it using the Nodes collection. This will be much faster than scanning the TreeView node by node looking for the desired text, especially if the TreeView has a lot of nodes.

Doug
Previous
Reply
Map
View

Click here to load this message in the networking platform