MSW> First of all, it's weird that by default wxListCtrl in MSW doesn't sort on
MSW> Column Click as it does in OS X.
AFAIR it's a bug that OS X version does sorting automatically because, in
fact, sorting by the clicked column might not always make sense.
MSW> That said, I can't figure out a way to make it work even with my custom
MSW> sorting.
MSW> How can I know before sorting the column ordering (ascending/descending) to
MSW> -at least- pass it as a parameter to the sort function?
You need to store it as a variable in your code, as simple as this.
MSW> And it sorts ok, but I want to be able to change between ascending and
MSW> descending as every other app ever does (default Windows behaviour)
It's not default in the sense that it's implemented in each of these apps,
the native listview control doesn't do anything at all when you click on
its header.
Admittedly, it would be nice to encapsulate this in wx but it's not
difficult to do it on your own and it would, on the contrary, be very
difficult to do it in wxListCtrl itself because it has no idea about the
data it contains. wxDataViewCtrl, with its clear separation of the model
from the control itself, has an advantage here and can do it.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/