Hallo Peter,
Have a look at the wxGrid wiki at:
http://wiki.wxpython.org/index.cgi/wxGrid#head-29b445f60c263fa3715196f0d85fdd05418f02c9
Make sure to set self.currentRows and self.currentColumns in the approriate places. I actually added them to the end of ResetView and in the init for PyGridTableBase.
Hope this helps
Werner
Peter Wurmsdobler wrote:
···
Hello,
I am struggling with an apparantly simple problem: I want to change a WxGrid when the underlying data table changes.
What I did now is: I create the data table and labels, then a wxPyGridTableBase from these, and then I issue a SetTable() in what I called the Build() method of a class derived from wxGrid.
Once and a while the underlying table data change, the data table grows or shrinks in rows, and the cell data change.
I tried to recreate the wxPyGridTableBase from the new table and call SetTable again, but SetTable cannot be called twice on the same wxGrid. Do I have to destroy the entire WxGrid in this case, or is there something like ResetTable().
Any help is very much appreciated !
Thanks in advance,
peter---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org