Hi!
I'm new to wxPython and I'm willing to add a column with checkboxes to
a grid and I'm using wxGlade to write the Python code. Is there an
easier way to do that rather than subclassing the grid and creating it
by hand?
I got this from the demo (GridCustTable.py)
···
----------------------------------------------------------------------
def __init__(self, log):
wxPyGridTableBase.__init__(self)
self.log = log
self.colLabels = ['ID', 'Description', 'Severity', 'Priority', 'Platform',
'Opened?', 'Fixed?', 'Tested?', 'TestFloat']
self.dataTypes = [wxGRID_VALUE_NUMBER,
wxGRID_VALUE_STRING,
wxGRID_VALUE_CHOICE + ':only in a million years!,wish list,minor,normal,major,critical',
wxGRID_VALUE_NUMBER + ':1,5',
wxGRID_VALUE_CHOICE + ':all,MSW,GTK,other',
wxGRID_VALUE_BOOL,
wxGRID_VALUE_BOOL,
wxGRID_VALUE_BOOL,
wxGRID_VALUE_FLOAT + ':6,2',
]
self.data = [
[1010, "The foo doesn't bar", "major", 1, 'MSW', 1, 1, 1, 1.12],
[1011, "I've got a wicket in my wocket", "wish list", 2, 'other', 0, 0, 0, 1.50],
[1012, "Rectangle() returns a triangle", "critical", 5, 'all', 0, 0, 0, 1.56]
]
----------------------------------------------------------------------
and I'm willing something as in the wxGRID_VALUE_BOOL. But my grid has
23 columns and it can grow a 'little' later... I'm willing to avoid
having to specify each column by hand and, if possible, just change
the datatypes. Is it possible?
--
Godoy. <godoy@metalab.unc.edu>