You can use checkboxes for any cell by explicitly setting it up to use wxGridCellBoolRenderer
and wxGridCellBoolEditor
, but the simplest way to use them is to just use boolean values for the cells in the first column, i.e. define a custom wxGridTable
subclass which would return wxGRID_VALUE_BOOL
from its GetTypeName()
for the first column.
Then the checkboxes will be used automatically.
I'm sure you can find some examples in Python as well, but I can only point you to C++ grid sample, which should hopefully translate to Python in a straightforward way.