wxListCtrl with CheckBox?

simo simoninusa2001 at yahoo.co.uk
Sat Apr 10 02:56:42 EDT 2004


I've got a report list and want to have a checkbox in the last column
of each row.

I can't use SetItem to put the control there, not even a ToggleBox,
and I haven't been able to superimpose the checkbox on top of the
ListCtrl either (that was a desperate attempt, which would have
involved lots of nasty looping to get the position for each row!)

The only way to do it I've seen is to have an image that switches when
you click:

   http://wiki.wxwindows.org/wiki.pl?WxListCtrl

But then I don't think you will get the right event (you only get the
row click event, not neccesarily the image click) and I already have a
row click event, plus I'm pretty sure images are only for the first
column.

Is there a better way? I was hoping wxWidgets 2.5 was going to have
this widget, or better still, the ability to put any [reasonable]
control into a list cell....

On a side note, I've just installed wxPython and Python 2.3 onto a
friend's LindowsOS box using a single apt-get command, it was a much
nicer experience than compiling everything in RedHat9 and then
rebuilding an RPM to upgrade to 2.5.1.5



More information about the Python-list mailing list