Hello.
I'm using a treeview control and i'm building a search routine. The problem
is that, if the string i'm searching doesn't exists on the Tree, all the
nodes of the tree stay expanded. Is there any method to collapse all the
nodes?
Thanks.
David C. Holley - 01 Mar 2005 20:30 GMT
If I'm not mistaken, it should be possible to iterate through the .Nodes
collection looking for the specific item(s) without expanding each
PARENT. The display is independent of examining the values. I've got a
bit of code that updates the description of a node when then related
record is updated that operates on looping through the nodes, however as
it the nodes are expanded by default.
Yes, it is possible to collapse all of the nodes via code. However, I do
not know the specific method as I remember reading about it, but didn't
need the functionality at that moment.
David H
> Hello.
> I'm using a treeview control and i'm building a search routine. The problem
[quoted text clipped - 3 lines]
>
> Thanks.
Alex Dybenko - 02 Mar 2005 14:46 GMT
Hi,
to collapse node - set Expanded property to false
search - if you load treeview from the table - could be a good idea to
search in a table and then select found node on the treeview

Signature
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
> Hello.
> I'm using a treeview control and i'm building a search routine. The
[quoted text clipped - 4 lines]
>
> Thanks.