wx.grid.GridCellChoiceEditor only showing in first wx.grid cell?

Since you are reusing the same cell editor for each row I think you need to increment its reference count with .IncRef each time you use it.

Another way to solve this that would probably make more sense in this case is to set it as part of the column attributes. Then the first cell in every row would use the same editor automatically (as well as any other common attributes you set.)

Next time please send a runnable sample: MakingSampleApps - wxPyWiki

···

On 3/28/11 11:13 AM, David LePage wrote:

Hi,
I have a wx.grid class that allows the user to "add" additional grid rows but
clicking an "Add" wx.button.
The choice editor should only be attached to the first column cell, even though
the row will have 5 possible column cells.

I've attached a wx.grid.GridCellChoiceEditor to the class. When I click the Add
button to add a new empty row, the choiceeditor properly displays the value in
row 0, and column 0.

If I attempt to add a second row using the same wx.Button, I don't get the
choiceeditor drop down in the cell. Not sure why.

Here is the code I think is relevant to the problem. I'm assuming it's in the
OnAddClick function?

--
Robin Dunn
Software Craftsman