943,696 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 615
  • Python RSS
Dec 28th, 2008
0

Programmatically Select item in TreeCtrl

Expand Post »
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
Reputation Points: 10
Solved Threads: 1
Light Poster
MaxVK is offline Offline
46 posts
since Nov 2008
Dec 29th, 2008
0

Re: Programmatically Select item in TreeCtrl

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
Reputation Points: 10
Solved Threads: 1
Light Poster
MaxVK is offline Offline
46 posts
since Nov 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Music in Python
Next Thread in Python Forum Timeline: how to copy a file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC