formatting changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-10-10 01:44:00 +00:00
parent f85d862c23
commit edb89f7e35

View File

@@ -3435,7 +3435,7 @@ wxGridWindow::wxGridWindow( wxGrid *parent,
m_owner = parent; m_owner = parent;
m_rowLabelWin = rowLblWin; m_rowLabelWin = rowLblWin;
m_colLabelWin = colLblWin; m_colLabelWin = colLblWin;
SetBackgroundColour( "WHITE" ); SetBackgroundColour(_T("WHITE"));
} }
@@ -3852,24 +3852,24 @@ void wxGrid::CalcDimensions()
} }
else else
{ {
w = (w + GRID_SCROLL_LINE - 1)/GRID_SCROLL_LINE; w = (w + GRID_SCROLL_LINE - 1)/GRID_SCROLL_LINE;
if ( x >= w ) if ( x >= w )
x = w - 1; x = w - 1;
} }
if ( h <= ch ) if ( h <= ch )
{ {
h = 0; y = 0; h = 0; y = 0;
} }
else else
{ {
h = (h + GRID_SCROLL_LINE - 1)/GRID_SCROLL_LINE; h = (h + GRID_SCROLL_LINE - 1)/GRID_SCROLL_LINE;
if ( y >= h ) if ( y >= h )
y = h - 1; y = h - 1;
} }
// do set scrollbar parameters // do set scrollbar parameters
SetScrollbars( GRID_SCROLL_LINE, GRID_SCROLL_LINE, SetScrollbars( GRID_SCROLL_LINE, GRID_SCROLL_LINE,
w, h, x, y, (GetBatchCount() != 0)); w, h, x, y, (GetBatchCount() != 0));
} }
@@ -8240,8 +8240,8 @@ void wxGrid::SetDefaultRowSize( int height, bool resizeExistingRows )
if ( resizeExistingRows ) if ( resizeExistingRows )
{ {
InitRowHeights(); InitRowHeights();
if ( !GetBatchCount() ) if ( !GetBatchCount() )
CalcDimensions(); CalcDimensions();
} }
} }
@@ -8275,8 +8275,8 @@ void wxGrid::SetDefaultColSize( int width, bool resizeExistingCols )
if ( resizeExistingCols ) if ( resizeExistingCols )
{ {
InitColWidths(); InitColWidths();
if ( !GetBatchCount() ) if ( !GetBatchCount() )
CalcDimensions(); CalcDimensions();
} }
} }
@@ -8404,33 +8404,35 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column )
} }
} }
if ( column ){ if ( column )
{
SetColSize(col, extentMax); SetColSize(col, extentMax);
if ( !GetBatchCount() ) if ( !GetBatchCount() )
{ {
int cw, ch, dummy; int cw, ch, dummy;
m_gridWin->GetClientSize( &cw, &ch ); m_gridWin->GetClientSize( &cw, &ch );
wxRect rect ( CellToRect( 0, col ) ); wxRect rect ( CellToRect( 0, col ) );
rect.y = 0; rect.y = 0;
CalcScrolledPosition(rect.x, 0, &rect.x, &dummy); CalcScrolledPosition(rect.x, 0, &rect.x, &dummy);
rect.width = cw - rect.x; rect.width = cw - rect.x;
rect.height = m_colLabelHeight; rect.height = m_colLabelHeight;
m_colLabelWin->Refresh( TRUE, &rect ); m_colLabelWin->Refresh( TRUE, &rect );
} }
} }
else{ else
{
SetRowSize(row, extentMax); SetRowSize(row, extentMax);
if ( !GetBatchCount() ) if ( !GetBatchCount() )
{ {
int cw, ch, dummy; int cw, ch, dummy;
m_gridWin->GetClientSize( &cw, &ch ); m_gridWin->GetClientSize( &cw, &ch );
wxRect rect ( CellToRect( row, 0 ) ); wxRect rect ( CellToRect( row, 0 ) );
rect.x = 0; rect.x = 0;
CalcScrolledPosition(0, rect.y, &dummy, &rect.y); CalcScrolledPosition(0, rect.y, &dummy, &rect.y);
rect.width = m_rowLabelWidth; rect.width = m_rowLabelWidth;
rect.height = ch - rect.y; rect.height = ch - rect.y;
m_rowLabelWin->Refresh( TRUE, &rect ); m_rowLabelWin->Refresh( TRUE, &rect );
} }
} }
if ( setAsMin ) if ( setAsMin )
{ {