Sorting a virtual wxListCtrl and EVT_LIST_ITEM_DESELECTED

Arye Halioua wrote:
Hello all,
Is adding a sorting facility with wxColumnSorterMixin to
a virtual wxListCtrl possible ?

No, wxColumnSorterMixin assumes that it is not a virtual wxLIstCtrl. It
would be easy to add that functionality to your class yourself (or make
a new mixin) though. Sorting a virtual wxListCtrl is just a matter of
sorting your data and calling Refresh, and the rest is just catching the
column click events and setting the up/down images on the column headers.

No problem to sort the data and call Refresh, but "just catching the
column click events and setting the up/down images on the column headers"
seems a little more difficult :-).

Also, with a virtual wxListCtrl, the EVT_LIST_ITEM_DESELECTED
event handler does not seem to be processed. One can check this
in the demo by comparing the virtual with the regular wxListCtrl
that does work fine.
I use wxPython 2.4.0.7 running on python 2.2.1

On which platform?

This happens on Windows XP. To be more specific, in the demo,
one can notice that the OnItemDeselected function is only called
when a SELECTED list item is DESELECTED with a CTRL+CLICK.
This is not consistent with the regular demo where the function gets called
also when a SELECTED list item is DESELECTED when simply
scrolling up or down the list with the keyboard.

Arye.

Arye Halioua wrote:

This happens on Windows XP. To be more specific, in the demo,
one can notice that the OnItemDeselected function is only called
when a SELECTED list item is DESELECTED with a CTRL+CLICK.
This is not consistent with the regular demo where the function gets called
also when a SELECTED list item is DESELECTED when simply
scrolling up or down the list with the keyboard.

Please enter a bug report about this.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!