Ty for Your reply,
I would like to control a node only if it has a child node.
if (TreeView1->SelectedNode->Nodes[0])
{
//mycode
}
Given code works (enters parenthesis) only if a node has child nodes, but if
there is no TreeView1->SelectedNode->Nodes[0] it returns an exception of
type System.ArgumentOutOfRangeException.
Could You tell me what should be taken into considerations? I really don't
want to handle this exception.
gmb
[quoted text, click to view] "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:eF%23%23JWAhHHA.960@TK2MSFTNGP03.phx.gbl...
> "gmb" <diehard_gmb@wp.pl> schrieb:
>> How to check SelectedNode's child? There is ->SelectedNode->Parent, but
>> how to check/control a child?
>
> 'Me.TreeView1.SelectedNode.Nodes(<index>)'.
>
> --
> M S Herfried K. Wagner
> M V P <URL:
http://dotnet.mvps.org/> > V B <URL:
http://dotnet.mvps.org/dotnet/faqs/> >