- case wxGridSelection::wxGridSelectCells:
- r = m_grid->BlockToDeviceRect( wxGridCellCoords( row, col ),
- wxGridCellCoords( row, col ) );
- break;
- case wxGridSelection::wxGridSelectRows:
- r = m_grid->BlockToDeviceRect( wxGridCellCoords( row, 0 ),
- wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ) );
- break;
- case wxGridSelection::wxGridSelectColumns:
- r = m_grid->BlockToDeviceRect( wxGridCellCoords( 0, col ),
- wxGridCellCoords( m_grid->GetNumberRows() - 1, col ) );
- break;
+ case wxGrid::wxGridSelectCells:
+ {
+ r = m_grid->BlockToDeviceRect( wxGridCellCoords( row, col ),
+ wxGridCellCoords( row, col ) );
+ if ( !m_grid->GetBatchCount() )
+ ((wxWindow *)m_grid->m_gridWin)->Refresh( FALSE, &r );
+ wxGridRangeSelectEvent gridEvt( m_grid->GetId(),
+ wxEVT_GRID_RANGE_SELECT,
+ m_grid,
+ wxGridCellCoords( row, col ),
+ wxGridCellCoords( row, col ),
+ FALSE,
+ ControlDown, ShiftDown,
+ AltDown, MetaDown );
+ m_grid->GetEventHandler()->ProcessEvent(gridEvt);
+ break;
+ }
+ case wxGrid::wxGridSelectRows:
+ {
+ r = m_grid->BlockToDeviceRect( wxGridCellCoords( row, 0 ),
+ wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ) );
+ if ( !m_grid->GetBatchCount() )
+ ((wxWindow *)m_grid->m_gridWin)->Refresh( FALSE, &r );
+ wxGridRangeSelectEvent gridEvt( m_grid->GetId(),
+ wxEVT_GRID_RANGE_SELECT,
+ m_grid,
+ wxGridCellCoords( row, 0 ),
+ wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ),
+ FALSE,
+ ControlDown, ShiftDown,
+ AltDown, MetaDown );
+ m_grid->GetEventHandler()->ProcessEvent(gridEvt);
+ break;
+ }
+ case wxGrid::wxGridSelectColumns:
+ {
+ r = m_grid->BlockToDeviceRect( wxGridCellCoords( 0, col ),
+ wxGridCellCoords( m_grid->GetNumberRows() - 1, col ) );
+ if ( !m_grid->GetBatchCount() )
+ ((wxWindow *)m_grid->m_gridWin)->Refresh( FALSE, &r );
+ wxGridRangeSelectEvent gridEvt( m_grid->GetId(),
+ wxEVT_GRID_RANGE_SELECT,
+ m_grid,
+ wxGridCellCoords( 0, col ),
+ wxGridCellCoords( m_grid->GetNumberRows() - 1, col ),
+ FALSE,
+ ControlDown, ShiftDown,
+ AltDown, MetaDown );
+ m_grid->GetEventHandler()->ProcessEvent(gridEvt);
+ break;
+ }