In fact wxgrid does what I want, I just need to read the docs 
But even reading the docs, there thinks that I don't understand. I have
used the demo GridCustTable.py and change it to add columns label after
the call of SetTable() and not in the __init__ method of the
CustomDataTable() but the way I do it doesn't works and I don't see
where is the problem.
Attached is the GridCustTable.py renamed and modified.
I use python 2.3.3 and wxpython 2.4.2.4
Here is the code that handle the grid:
class TestFrame(wxFrame):
def __init__(self, parent):
wxFrame.__init__(self, parent, -1, "Custom Table, data driven
Grid Demo", size=(640,480))
p = wxPanel(self, -1, style=0)
agrid = ToDoGrid(p, -1)
# I set labels here
agrid.SetGridLabelsandTypes()
bs = wxBoxSizer(wxVERTICAL)
bs.Add(agrid, 1, wxGROW|wxALL, 5)
p.SetSizer(bs)
TDGridTools.py (7.2 KB)
···
Le ven 02/04/2004 à 20:13, Robin Dunn a écrit :
Everaert Roland wrote:
> Hello,
>
> I would like to use a grid that can display checkboxes, maybe buttons
> and combox in each cell of a particular column.
>
> Can I use a wxGrid widget or have I to use wxFlexGridSizer and
> reimplementing things such as changing the size of a column using the
> mouse?
The wx.Grid can only display one control (grid cell editor) at a time,
so if you want all the controls to be active then you'll need to do
something like the latter option.
#---------------------------------------------------------------------------
if __name__ == '__main__':
import sys
app = wxPySimpleApp()
frame = TestFrame(None)
frame.Show(true)
app.MainLoop()
Hope this mail is not to big.
Thanks for any advise.
--
Everaert Roland <roland_everaert@yahoo.fr>