How to change the default selection of wxGrid?

Hello,

I found several problem when I use wxPython.

Run a grid demo, the top left cell will be focus,
make a motion of mouse right button on other cell,
this will select a block of cells,then left click
on any cell, the result is strange.

Run a grid demo, use the mouse right button to
resize column size, the size will not change but
show another grid line.

I need a grid like this:

I can make left/right click or motion on any cell,
this will not select the cell, but also get the
row and col. I have implement this by bind a empty
function to EVT_GRID_SELECT_CELL.

When I hold Shift, I can select block with left/right,
as the default behavior of wx.grid. I have try to
bind process to the EVT_GRID_RANGE_SELECT or extend
the GridRangeSelectEvent, but I found this take no effect.

Could you give me some advice on how to change the
default selection behavior of wx.grid?

Best Regards.
deafwolf

deafwolf wrote:

Hello,

I found several problem when I use wxPython.

Run a grid demo, the top left cell will be focus,
make a motion of mouse right button on other cell,
this will select a block of cells,then left click
on any cell, the result is strange.

Looks like it is just missing a Refresh. Please enter a bug report about this.

Run a grid demo, use the mouse right button to
resize column size, the size will not change but
show another grid line.

I can't duplicate this one.

I need a grid like this:

I can make left/right click or motion on any cell,
this will not select the cell, but also get the
row and col. I have implement this by bind a empty
function to EVT_GRID_SELECT_CELL.

When I hold Shift, I can select block with left/right,
as the default behavior of wx.grid. I have try to
bind process to the EVT_GRID_RANGE_SELECT or extend
the GridRangeSelectEvent, but I found this take no effect.

Could you give me some advice on how to change the
default selection behavior of wx.grid?

One way to do it would be to intercept the mouse events from grid.GetGridWindow() and implement the selection yourself.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!