It must be there somewhere, because Ruben had replied to my original post.
I meant my response to your orginal question a couple weeks ago.
OK, I understand why it is necessary to keep a seperate list.
You say it is not necessary to sort the second list and then reload the
list. Are you implying that this would be slower than using the
SortItems method and using the second list to do the comparisons (as in
the demo) ?
I'm just guessing, but for a large list (a few thousands of items) I think
yes, it would be slower to reload. You have to delete all the items, and
then add them all. That's a lot of memory allocations/deletions going on
behind the scenes, plus there are delete item events being fired (even if
you don't catch them,) etc.
I am currently using the same method as the demo, except
that the python list is dynamicly created. I was going to try the sort
python list method and then reload the wxListCtrl but I'm not sure if
it's worth it now.
If you have time, try it and let us know.
I imagine the fastest way to do a sort columns would be to have it all
done in the C++ widget, either as an extra parameter to SortItems or
another method SortItemsByColumn.
That assumes you want to sort things the same way every time for every list,
but I guess for most cases it would be alright... I'll add it to my list.
It may not make it into the actual C++ class, but maybe in the wxPython
wrapper code (the C++ half)
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users