+void wxGrid::DrawGridSpace( wxDC& dc )
+{
+ if ( m_numRows && m_numCols )
+ {
+ int cw, ch;
+ m_gridWin->GetClientSize( &cw, &ch );
+
+ int right, bottom;
+ CalcUnscrolledPosition( cw, ch, &right, &bottom );
+
+ if ( right > GetColRight(m_numCols-1) ||
+ bottom > GetRowBottom(m_numRows-1) )
+ {
+ int left, top;
+ CalcUnscrolledPosition( 0, 0, &left, &top );
+
+ dc.SetBrush( wxBrush(GetDefaultCellBackgroundColour(), wxSOLID) );
+ dc.SetPen( *wxTRANSPARENT_PEN );
+
+ if ( right > GetColRight(m_numCols-1) )
+ dc.DrawRectangle( GetColRight(m_numCols-1)+1, top,
+ right - GetColRight(m_numCols-1), ch );
+
+ if ( bottom > GetRowBottom(m_numRows-1) )
+ dc.DrawRectangle( left, GetRowBottom(m_numRows-1)+1,
+ cw, bottom - GetRowBottom(m_numRows-1) );
+ }
+ }
+}
+
+