+bool wxGrid::MovePageUp()
+{
+ if ( m_currentCellCoords != wxGridNoCellCoords &&
+ m_scrollPosY > 0 )
+ {
+ int row = m_currentCellCoords.GetRow();
+ int y = m_rowBottoms[ row ] - m_rowHeights[ row ];
+ while ( row > 0 )
+ {
+ if ( y + m_rowHeights[row-1] > m_bottom ) break;
+ y += m_rowHeights[ --row ];
+ }
+ SetVerticalScrollPos( row );
+
+ SelectCell( row, m_currentCellCoords.GetCol() );
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+bool wxGrid::MovePageDown()
+{
+ if ( m_currentCellCoords != wxGridNoCellCoords &&
+ m_scrollPosY + m_wholeRowsVisible < m_numRows )
+ {
+ if ( m_wholeRowsVisible > 0 )
+ {
+ SetVerticalScrollPos( m_scrollPosY + m_wholeRowsVisible );
+ }
+ else if ( m_scrollPosY < m_numRows - 1 )
+ {
+ SetVerticalScrollPos( m_scrollPosY + 1 );
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ // m_scrollPosY will have been updated
+ //
+ SelectCell( m_scrollPosY, m_currentCellCoords.GetCol() );
+ return TRUE;
+ }
+
+ return FALSE;
+}
+