|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
treenode find nodeHi,
I have a problem with treenode I know the node.text of a selected node in a variable and then some nodes are removed but not the selected node who is no more selected (so using index and level are changed) How can I find the node by the name I know. I know a methode in a treenode with one rootnode with a recurse procedure to test each node But is there no faster way? Thanks for any response Since you're not removing the selected node you can store a reference to it
in a variable (i.e. the whole node, not just the text). Once done just use the Selected property to select it again /claes Show quoteHide quote "andreas" <andr***@pandora.be> wrote in message news:ovQkg.486911$ZV4.12407837@phobos.telenet-ops.be... > Hi, > I have a problem with treenode > I know the node.text of a selected node in a variable and then some nodes > are removed but not the selected node who is no more selected (so using > index and level are changed) > How can I find the node by the name I know. > I know a methode in a treenode with one rootnode with a recurse procedure > to > test each node But is there no faster way? > Thanks for any response > > > in .net 2.0 this is supported . There is
a treeview.Nodes.Find(NodeName, SearchCildren) method that goes down the treeview and returns an array of treenodes. Giannis Show quoteHide quote "andreas" <andr***@pandora.be> wrote in message news:ovQkg.486911$ZV4.12407837@phobos.telenet-ops.be... > Hi, > I have a problem with treenode > I know the node.text of a selected node in a variable and then some nodes > are removed but not the selected node who is no more selected (so using > index and level are changed) > How can I find the node by the name I know. > I know a methode in a treenode with one rootnode with a recurse procedure > to > test each node But is there no faster way? > Thanks for any response > > >
[STRING] extract a word and text around it
Learning Programming FileSystemWatcher raises Changed Twice.... Memory Leaks Overrides and mybase ?? Refer to an Instance of a form Newbie Question VB2005 - Sort DataGridView on Text (FormattedValue) of a ComboBox column instead of underlying value Timer1_Tick is never fired Application.ExecutablePath not recognisze by studio express 2005 |
|||||||||||||||||||||||