I am very new to the tree control!
I am trying to select a node, by node key, of a populated treeview control.
It seems to work (the correct node is selected) but it’s not highlighting the
node as if it were clicked upon.
I am sure I am missing some simple thing. I was looking at someone elses
code regarding the same issue. Does Selected = true do the trick? What does
.Ensurevisible do?
The code I am using to do this
Private Treeview As MSComctlLib.Treeview
…
Treeview.Nodes(NodeKey).Selected = True
Treeview.Nodes(NodeKey).EnsureVisible
Alex Dybenko - 04 Feb 2005 20:50 GMT
look at treeview properties and try to set "hide seelction" to false

Signature
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
> I am very new to the tree control!
>
[quoted text clipped - 14 lines]
> Treeview.Nodes(NodeKey).Selected = True
> Treeview.Nodes(NodeKey).EnsureVisible
Rick Roberts - 05 Feb 2005 16:09 GMT
Thanks for responding Alex. I had the property set to false but your response
got me thinking. I found out that I wasn't setting the focus on the tree
control. That part now works great.
Thanks again,
Rick