git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5880
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/generic/grid.h"
#include "wx/generic/grid.h"
-#ifndef DRAW_LINES
-#define DRAW_LINES 1
+#ifndef WXGRID_DRAW_LINES
+#define WXGRID_DRAW_LINES 1
#endif
//////////////////////////////////////////////////////////////////////
#endif
//////////////////////////////////////////////////////////////////////
wxRegion reg = GetUpdateRegion();
m_owner->CalcCellsExposed( reg );
m_owner->DrawGridCellArea( dc );
wxRegion reg = GetUpdateRegion();
m_owner->CalcCellsExposed( reg );
m_owner->DrawGridCellArea( dc );
m_owner->DrawAllGridLines( dc, reg );
#endif
}
m_owner->DrawAllGridLines( dc, reg );
#endif
}
if ( m_colWidths[coords.GetCol()] <=0 ||
m_rowHeights[coords.GetRow()] <= 0 ) return;
if ( m_colWidths[coords.GetCol()] <=0 ||
m_rowHeights[coords.GetRow()] <= 0 ) return;
if ( m_gridLinesEnabled )
DrawCellBorder( dc, coords );
#endif
if ( m_gridLinesEnabled )
DrawCellBorder( dc, coords );
#endif
CalcUnscrolledPosition( x + w, y + h, &right, &bottom );
}
CalcUnscrolledPosition( x + w, y + h, &right, &bottom );
}
+ // avoid drawing grid lines past the last row and col
+ //
+ right = wxMin( right, m_colRights[m_numCols-1] );
+ bottom = wxMin( bottom, m_rowBottoms[m_numRows-1] );
+
dc.SetPen( wxPen(GetGridLineColour(), 1, wxSOLID) );
// horizontal grid lines
//
int i;
dc.SetPen( wxPen(GetGridLineColour(), 1, wxSOLID) );
// horizontal grid lines
//
int i;
- for ( i = 0; i <= m_numRows; i++ )
+ for ( i = 0; i < m_numRows; i++ )
{
if ( m_rowBottoms[i] > bottom )
{
{
if ( m_rowBottoms[i] > bottom )
{
// vertical grid lines
//
// vertical grid lines
//
- for ( i = 0; i <= m_numCols; i++ )
+ for ( i = 0; i < m_numCols; i++ )
{
if ( m_colRights[i] > right )
{
{
if ( m_colRights[i] > right )
{