i only know the node text property

TIA

Re: treeview - select a node programmatically by hirf-spam-me-here

hirf-spam-me-here
Mon Apr 26 07:00:22 CDT 2004

* "John Smith" <a__@abv.bg> scripsit:
> i only know the node text property

You will have to recursively loop through the nodes to find the node.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Re: treeview - select a node programmatically by John

John
Mon Apr 26 07:21:28 CDT 2004

ok, but what do i do when i find it?
whats the method that selects the node?

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:c6itp8$c31nq$1@ID-208219.news.uni-berlin.de...
> * "John Smith" <a__@abv.bg> scripsit:
> > i only know the node text property
>
> You will have to recursively loop through the nodes to find the node.
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>



Re: treeview - select a node programmatically by Morten

Morten
Mon Apr 26 08:15:09 CDT 2004

Hi John,

treeView1.SelectedNode =3D node;

Happy coding!
Morten Wennevik [C# MVP]

Re: treeview - select a node programmatically by Stoitcho

Stoitcho
Mon Apr 26 08:16:56 CDT 2004

Hi John,

Once you find the node with the given text, you have a reference to a
TreeNode object, set the TreeView.Selected node to that reference.


--
B\rgds
Stoitcho Goutsev (100) [C# MVP]
"John Smith" <a__@abv.bg> wrote in message
news:u2i2Pk4KEHA.1340@TK2MSFTNGP12.phx.gbl...
> ok, but what do i do when i find it?
> whats the method that selects the node?
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> news:c6itp8$c31nq$1@ID-208219.news.uni-berlin.de...
> > * "John Smith" <a__@abv.bg> scripsit:
> > > i only know the node text property
> >
> > You will have to recursively loop through the nodes to find the node.
> >
> > --
> > Herfried K. Wagner [MVP]
> > <URL:http://dotnet.mvps.org/>
>
>



Re: treeview - select a node programmatically by John

John
Mon Apr 26 08:21:41 CDT 2004

ok, tnx for ur quick answers
i`ll try :))

"John Smith" <a__@abv.bg> wrote in message
news:u2i2Pk4KEHA.1340@TK2MSFTNGP12.phx.gbl...
> ok, but what do i do when i find it?
> whats the method that selects the node?
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> news:c6itp8$c31nq$1@ID-208219.news.uni-berlin.de...
> > * "John Smith" <a__@abv.bg> scripsit:
> > > i only know the node text property
> >
> > You will have to recursively loop through the nodes to find the node.
> >
> > --
> > Herfried K. Wagner [MVP]
> > <URL:http://dotnet.mvps.org/>
>
>



Re: treeview - select a node programmatically by hirf-spam-me-here

hirf-spam-me-here
Mon Apr 26 11:46:06 CDT 2004

* "John Smith" <a__@abv.bg> scripsit:
> ok, but what do i do when i find it?
> whats the method that selects the node?

Set 'TreeView.SelectedNode' to the node and cancel further enumeration.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Re: treeview - select a node programmatically by John

John
Tue Apr 27 01:49:22 CDT 2004

hehe
this is clever

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:c6jecm$cjk8j$1@ID-208219.news.uni-berlin.de...
> * "John Smith" <a__@abv.bg> scripsit:
> > ok, but what do i do when i find it?
> > whats the method that selects the node?
>
> Set 'TreeView.SelectedNode' to the node and cancel further enumeration.
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>