471,315 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,315 software developers and data experts.

problem in 'TreeView' class

hi,

when i use the "System.Windows.Forms.TreeView" class,
the first node gets selected by default.
i don't want this default behavior.
i don't wany any node to be selected when the "TreeView" is
displayed initially.
how do I achieve this?

regards,
Kiran
Feb 13 '06 #1
3 1805
Hi Kiran,

I'm not 100% sure what you mean - but if you don't want to select any
node in a TreeView, you can simply set the 'SelectedNode' property:

tvTree.SelectedNode = null;

Let me know if that doesn't help.
Dave

Feb 14 '06 #2
i have already tried setting the SelectedNode property to null.
it doesn't work.
when the "TreeView" is displayed initially, the first node is always
selected by default.
i don't want this to happen.

i am facing this problem in my current project.
any immediate help would be greatly welcome.

regards,
Kiran

<dh*****@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi Kiran,

I'm not 100% sure what you mean - but if you don't want to select any
node in a TreeView, you can simply set the 'SelectedNode' property:

tvTree.SelectedNode = null;

Let me know if that doesn't help.
Dave

Feb 15 '06 #3
Hi
You can use
HideSelection=true
and
set tabIndex of TreeView to a value other than zero, to
make another control active control of the form when loading

A.Hadi

Feb 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Iain Bishop | last post: by
2 posts views Thread by Samuele Giovanni Tonon | last post: by
2 posts views Thread by Bonj | last post: by
1 post views Thread by Abdessamad Belangour | last post: by
3 posts views Thread by johnb41 | last post: by
4 posts views Thread by Jeff Beem | last post: by
2 posts views Thread by Claus | last post: by
reply views Thread by bsturg21 | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.