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

Treeview lock 1

Status
Not open for further replies.

DeadIslets

Programmer
Apr 3, 2002
45
US
I need some help here. I want to take a treeview object and programatically select a node, 4 nodes deep in the tree and then expand the node at that level. Then I want to lock it where the user cannot make a selection anywhere up the tree but must continue on down this same branch.

By looking a several examples I think I can programatically select the node satisfactorily, however I'm clueless how to lock the node or even if it's possible. Any and all help would be greatly appreated.

Thanks,

Keith
 
I'm not sure if you can lock a node without locking theentire treeview control (i.e., Enabled=False). Perhaps you could take a different route. Instead of programatically selecting and expanding the desired node, disable the "main" treeview and display a second treeview where the desired node is the root. Maybe hide the "main" treeview, or position the new one over it. Or something like that. :)

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
jebenson, thanks for the reply and the suggestions. I had thought about the possibility of isolating the branch before and think I'll go this direction.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top