•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 429,776 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,893 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser: Programming Forums
Views: 231 | Replies: 0
![]() |
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I'm having a heck of a time sorting a TreeListCtrl.
I've found very little documentation on it, so I went out & bought a book called "wxPython In Action". It says something along the lines of "a tree list control is so similar to list control, we won't go into the tree list control methods".
The problem I'm having is that, in order to sort a list control, it seems that you have to call SetItemData to add elements to the list. However, tree list controls don't have the SetItemData function (at least as far as I can tell) - only SetItemText & don't seem to respond to the sort style.
Maybe a TreeListCtrl is not sortable?
If that's the case, how would one make, for instance, a file browser that works like a TreeCtrl (where you can expand/collapse directories), but has multiple columns so you can sort by file name, user name, file size, etc?
I've found very little documentation on it, so I went out & bought a book called "wxPython In Action". It says something along the lines of "a tree list control is so similar to list control, we won't go into the tree list control methods".
The problem I'm having is that, in order to sort a list control, it seems that you have to call SetItemData to add elements to the list. However, tree list controls don't have the SetItemData function (at least as far as I can tell) - only SetItemText & don't seem to respond to the sort style.
Maybe a TreeListCtrl is not sortable?
If that's the case, how would one make, for instance, a file browser that works like a TreeCtrl (where you can expand/collapse directories), but has multiple columns so you can sort by file name, user name, file size, etc?
![]() |
•
•
•
•
•
•
•
•
DaniWeb Python Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the Python Forum
- Previous Thread: Module error? and gasp module problem
- Next Thread: getting a variable name


Linear Mode