Information générale
Catégorie:
Codage, syntaxe et commandes
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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement