Reputation: 2524
Initially, I want nothing selected on my TreeView. By default, the first node is selected/focused.The code
treeView1.SelectedNode = null;
didn't work.
Upvotes: 0
Views: 290
Reputation: 5403
Put your line of code
treeView1.SelectedNode = null;
in the Form.Shown
event, rather than in the Form.Load
event. The default selection occurs after Form.Load
, so you want to clear the selection after that.
Upvotes: 0
Reputation: 704
The tree node is not selected but has tap stop
treeView1.SelectedNode = null;
treeView1.TabStop = false;
Upvotes: 2