Treeview / Listview search code

D

DP

Would anyone be able to provide me with the code fragments for searching
text strings (*x*) in both Treeview and Listview controls?

With Treeview controls it would, I assume, be impossible to do any kind of
multiselect, and I don't know whether code would work to continue through
the treeview nodes - selecting the first node that contains the search code,
then the next, on through to the last.

With Listview, since it can be set to multiselect, I would assume that
search code COULD select all the items matching the string.

Thank you, David Pike
 
A

Alex Dybenko

try something like this:

dim n as node
for each n in oTV.nodes
if n.text like "*x*" then
'found!
n.selected=true
exit for
end if
next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top