if ( m_currentCellCoords != wxGridNoCellCoords &&
m_currentCellCoords.GetRow() > 0 )
{
+ if ( expandSelection )
+ m_selection->SelectCell( m_currentCellCoords.GetRow(),
+ m_currentCellCoords.GetCol() );
+
MakeCellVisible( m_currentCellCoords.GetRow() - 1,
m_currentCellCoords.GetCol() );
bool wxGrid::MoveCursorDown( bool expandSelection )
{
- // TODO: allow for scrolling
- //
if ( m_currentCellCoords != wxGridNoCellCoords &&
m_currentCellCoords.GetRow() < m_numRows-1 )
{
+ if ( expandSelection )
+ m_selection->SelectCell( m_currentCellCoords.GetRow(),
+ m_currentCellCoords.GetCol() );
+
MakeCellVisible( m_currentCellCoords.GetRow() + 1,
m_currentCellCoords.GetCol() );
if ( m_currentCellCoords != wxGridNoCellCoords &&
m_currentCellCoords.GetCol() > 0 )
{
+ if ( expandSelection )
+ m_selection->SelectCell( m_currentCellCoords.GetRow(),
+ m_currentCellCoords.GetCol() );
+
MakeCellVisible( m_currentCellCoords.GetRow(),
m_currentCellCoords.GetCol() - 1 );
if ( m_currentCellCoords != wxGridNoCellCoords &&
m_currentCellCoords.GetCol() < m_numCols - 1 )
{
+ if ( expandSelection )
+ m_selection->SelectCell( m_currentCellCoords.GetRow(),
+ m_currentCellCoords.GetCol() );
+
MakeCellVisible( m_currentCellCoords.GetRow(),
m_currentCellCoords.GetCol() + 1 );