delete row in grid lose renderer

Hi all.

I have a grid with 3 rows and 3 columns. The cell (2.1) is custom renderer with bitmap.
If I try to delete the 2nd row the bitmap is lost.
What am I doing wrong?
Attached script.
ps:

The menu is shown with wx.grid.EVT_GRID_LABEL_RIGHT_CLICK

gestgrid.py (13.8 KB)

field2.gif

···


Fabio Spadaro
www.fabiospadaro.com

When a row is deleted then the attributes associated with the row and/or cells in the row are also deleted. The renderer and editor are part of those attributes. Either don't delete the row and just move the data values instead, or set the renderer and whatever other attributes you need on the new row 2.

···

On 8/20/10 2:01 AM, Fabio Spadaro wrote:

Hi all.
I have a grid with 3 rows and 3 columns. The cell (2.1) is custom
renderer with bitmap.
If I try to delete the 2nd row the bitmap is lost.
What am I doing wrong?

--
Robin Dunn
Software Craftsman

Hi,

···

2010/8/21 Robin Dunn robin@alldunn.com

On 8/20/10 2:01 AM, Fabio Spadaro wrote:

Hi all.

I have a grid with 3 rows and 3 columns. The cell (2.1) is custom

renderer with bitmap.

If I try to delete the 2nd row the bitmap is lost.

What am I doing wrong?

When a row is deleted then the attributes associated with the row and/or cells in the row are also deleted. The renderer and editor are part of those attributes. Either don’t delete the row and just move the data values instead, or set the renderer and whatever other attributes you need on the new row 2.

Robin Dunn

Software Craftsman

http://wxPython.org

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

OK, i resolved it.
Thanks.


Fabio Spadaro
www.fabiospadaro.com