Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TreeView - visible selected 1

Status
Not open for further replies.

seanbo

Programmer
Jun 6, 2003
407
GB
when you click on a treenode, it becomes selected and goes blue (blue for most people). you can select a node with code with something like treeView.selectedNode = fantasticNode - which would leave fantasticNode highlighted.

however, when i select a node using code before a user has clicked on the treeView i find that, although the node is selected, it isn't highlighted (highlit?). how can i force my TreeView to highlight the selected node?

phew - i went round the houses with this one.
 
I found to possible ways:
1. type "treeView1.Focus();" before you select the node.
2. type "treeView1.Select();" before you select the node.

I don't know the difference between them.It seems they do the same.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top