> def DeleteRow(self, row):
> if row < len(self.data):
> self.data.remove(self.data[row])
> msg = wxGridTableMessage(self,
> wxGRIDTABLE_NOTIFY_ROWS_DELETED,
> 1)
> self.GetView().ProcessTableMessage(msg)
>
>Am I doing something wrong here? Is there a bug in the
>ProcessTableMessage
>handler? Any help is greatly appreciated.
I'm not sure why it is adding a row, but you need to construct the >message
like this:msg = wxGridTableMessage(self,
wxGRIDTABLE_NOTIFY_ROWS_DELETED,
row,
1)so it specifies the position that the row(s) were deleted from as well as how many.
Robin,
Thanks for the tip. It works great now. Is there documentation on the "new" wxGrid? The wxWindows / wxPython Help Doc that ships with 2.2.5 describes a wxGrid that has a very different interface than the wxPython version. I have been able to get most of the info I need from the demos, but things like the above aren't covered in the demo. Should I download the wxWindows sources so I can get the interface details from the C++? Is there another way?
Thanks a lot for all your work on this great toolkit.
···
From: "Robin Dunn" <robin@alldunn.com>
To: <wxpython-users@lists.wxwindows.org>
Subject: Re: [wxPython] Deleting Rows in wxGrid - Is there a bug???
Date: Mon, 2 Apr 2001 13:37:18 -0700
Reply-To: wxpython-users@lists.wxwindows.org
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com