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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

treeview ctrl 2

Status
Not open for further replies.

poeijer

Programmer
May 29, 2002
69
0
0
NL
I add a couple nodes to a treeview
and then i want that the first item is default selected

how can i accomplish this?

thanks.
 
i managed to use this line:

oNode=.treeview.nodes.add(,1,"EM","first",0)
oNode.selected=.T.

it says that item is indeed selected but doesn't give
the highlighted bar over it???

thanks
 
The treeview control only shows the highlighted node bar if the treeview control has focus. Does it?
Dave S.
[cheers]
 
I think that behaviour is controlled by a property: HideSelection
 
Yes, you are correct. the treeview has to have the focus to see the highlighted bar...

thanks.
 
.... If you set the treeview's property HideSelection to False, (uncheck it on the Treeview's custom properties page) then the selection will be visible when the treeview doesn't have focus.
 
I just tried wgcs's suggestion too. That works too.
Dave S.
[cheers]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top