E> I am using wxListCtrl to display thousands of items with virutal and report
E> style. One problem that I encountered is that there seems no function
E> enable me to select all items (rows).
No. And while it could be added easily to the generic wxListCtrl (which
uses wxSelectionStore internally which does have SelectRange() method), I'm
not sure about how this could be implemented for the native MSW version.
E> Do you have any better ideas?
First, try using wxWindowUpdateLocker around your code. Second, if you can
find a way to do it with the native MSW control, don't hesitate to submit a
patch doing this for inclusion in wx, it would be welcome.
Good luck,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Thank you Vadim.
E> To bypass this issue I am trying to mange selected items myself.
I think it would be much simpler to modify wxListCtrl itself to support
this functionality.
BTW, I realized that I do know how to select all items in a virtual list
control under MSW: we need to store the selected state ourselves (using the
already mentioned wxSelectionStore) which means sending LVM_SETCALLBACKMASK
to the control and then returning the correct state from LVN_GETDISPINFO
handler. This looks relatively simple to do so, once again, I'd encourage
you to try to add SelectRange() and SelectAll() methods to wxListCtrl
itself. It would be definitely simpler than doing it outside of it and the
only extra thing you need to do to get it accepted in wxWidgets is to add a
documentation for the new methods to interface/wx/listctrl.h (which will
probably be just a few lines for these two).
Thanks for the indication!