Programmatically Select item in TreeCtrl

Thread Solved

Join Date: Nov 2008
Posts: 41
Reputation: MaxVK is an unknown quantity at this point 
Solved Threads: 1
MaxVK MaxVK is offline Offline
Light Poster

Programmatically Select item in TreeCtrl

 
0
  #1
Dec 28th, 2008
Hi. I have tree control with a structure already in it.

A function returns a string that matches one of the items in the tree control structure (They are all Unique), and I need to select that item in the tree. It doesn't matter if the code underlying a selection change runs or not, only that the item identified by the string is seen to be selected.

I am having real problems with this. To start with I'm not sure how to find the actual item in the first place, at least not without running through the entire tree structure and trying to match the label of each tree item to the string that I have.

Even if I were able to do this, I'm still in the dark about how to select the item.

Can anyone help please

Thanks

Max
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 41
Reputation: MaxVK is an unknown quantity at this point 
Solved Threads: 1
MaxVK MaxVK is offline Offline
Light Poster

Re: Programmatically Select item in TreeCtrl

 
0
  #2
Dec 29th, 2008
Doh! I already answered this myself in another project - the relevant code can be found here:http://www.daniweb.com/forums/post74...tml#post743573

Max
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC