wx.grid.Grid, PyGridTableBase and SetCellSize

Hello,

I have a wx.grid.Grid object in which I have a cell of 7 cell long. For this, I'm using "SetCellSize(0, 1, 1, 7)". My data are stored on a derived PyGridTableBase and I'm using GetAttr function to specify the attribute of cells.

When my grid is displayed, my "big cell" is correctly displayed: great !

But, if I select this cell, and push the right arrow key, the next cell (Row 0, Col 2) is selected "under" my big cell. And I can navigate on the 7 cells that should be under my big cell.

Note that for these celles, my GetAttr function (of my PyGridTableBase) returns None for the cell Row 0, Col 2 to 7.

What can I do to get a nice grid ?

Versions used:
Windows Vista
Python: 2.5.4
wxPython: 2.8.11.0

Sebastien

You can catch the EVT_GRID_SELECT_CELL event and in the handler check if it's moving to one of the hidden cells and then select a visible cell. It should really be automatic however so please create a ticket about this issue.

···

On 11/6/10 3:41 AM, VINOT S�bastien wrote:

Hello,

I have a wx.grid.Grid object in which I have a cell of 7 cell long. For this, I'm using "SetCellSize(0, 1, 1, 7)". My data are stored on a derived PyGridTableBase and I'm using GetAttr function to specify the attribute of cells.

When my grid is displayed, my "big cell" is correctly displayed: great !

But, if I select this cell, and push the right arrow key, the next cell (Row 0, Col 2) is selected "under" my big cell. And I can navigate on the 7 cells that should be under my big cell.

Note that for these celles, my GetAttr function (of my PyGridTableBase) returns None for the cell Row 0, Col 2 to 7.

What can I do to get a nice grid ?

--
Robin Dunn
Software Craftsman