[wxPython-users] Appending row to a grid ?
Robin Dunn
robin at alldunn.com
Wed Jan 30 13:38:38 PST 2008
Stef Mientki wrote:
> hello,
>
> I start with a grid that has only 1 fixed row and no data rows.
> The grid is initialized through SetTable
>
> In the table class I've added AppendRows, like this
> def AppendRows ( self, N ) :
> for i in range ( N ) :
> self.data.append ( self.GetNumberCols() * [''] )
> return True
>
> Extending the number of rows is done in the following way:
> self.Grid.AppendRows ( N )
> self.Grid.ForceRefresh()
> ... fill the new data here
>
> Now the data is stored correctly,
> but I don't see any rowextensions in the visual grid itself.
>
> What am I doning wrong ?
Normally the table will send a message to the grid to tell it that there
are more rows. See the uses of GridTableMessage in the demo for examples.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list