| | |
Programmatically Select item in TreeCtrl
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Nov 2008
Posts: 41
Reputation:
Solved Threads: 1
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
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
•
•
Join Date: Nov 2008
Posts: 41
Reputation:
Solved Threads: 1
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
Max
![]() |
Other Threads in the Python Forum
- Previous Thread: Music in Python
- Next Thread: how to copy a file
| Thread Tools | Search this Thread |
abrupt ansi anti approximation assignment avogadro backend beginner binary bluetooth calculator character cmd code customdialog decimals dictionaries dictionary directory drive dynamic error examples excel exe file float format function gnu graphics gui heads homework http ideas import input java launcher leftmouse line linux list lists logging loop module mouse number numbers output parsing path pointer port prime programming progressbar projects push py2exe pygame pyqt python random recursion schedule scrolledtext sqlite statistics stdout string strings sudokusolver sum table terminal text thread threading time tkinter tlapse tricks tuple tutorial twoup ubuntu unicode update urllib urllib2 variable ventrilo wikipedia windows write wxpython xlib





