Fixed problem where corner label was displayed when either row or col label size had been set to zero prior to first display.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
#include "wx/sizer.h"
|
||||||
#include "wx/layout.h"
|
#include "wx/layout.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -950,29 +951,29 @@ void wxGrid::Create()
|
|||||||
m_numCols = 0;
|
m_numCols = 0;
|
||||||
m_currentCellCoords = wxGridNoCellCoords;
|
m_currentCellCoords = wxGridNoCellCoords;
|
||||||
|
|
||||||
int colLblH = WXGRID_DEFAULT_COL_LABEL_HEIGHT;
|
m_rowLabelWidth = WXGRID_DEFAULT_ROW_LABEL_WIDTH;
|
||||||
int rowLblW = WXGRID_DEFAULT_ROW_LABEL_WIDTH;
|
m_colLabelHeight = WXGRID_DEFAULT_COL_LABEL_HEIGHT;
|
||||||
|
|
||||||
m_cornerLabelWin = new wxGridCornerLabelWindow( this,
|
m_cornerLabelWin = new wxGridCornerLabelWindow( this,
|
||||||
-1,
|
-1,
|
||||||
wxPoint(0, 0),
|
wxDefaultPosition,
|
||||||
wxSize(rowLblW, colLblH) );
|
wxDefaultSize );
|
||||||
|
|
||||||
m_rowLabelWin = new wxGridRowLabelWindow( this,
|
m_rowLabelWin = new wxGridRowLabelWindow( this,
|
||||||
-1,
|
-1,
|
||||||
wxPoint(0, colLblH),
|
wxDefaultPosition,
|
||||||
wxSize(rowLblW, -1) );
|
wxDefaultSize );
|
||||||
|
|
||||||
m_colLabelWin = new wxGridColLabelWindow( this,
|
m_colLabelWin = new wxGridColLabelWindow( this,
|
||||||
-1,
|
-1,
|
||||||
wxPoint(rowLblW, 0),
|
wxDefaultPosition,
|
||||||
wxSize(-1, colLblH ) );
|
wxDefaultSize );
|
||||||
|
|
||||||
m_gridWin = new wxGridWindow( this,
|
m_gridWin = new wxGridWindow( this,
|
||||||
m_rowLabelWin,
|
m_rowLabelWin,
|
||||||
m_colLabelWin,
|
m_colLabelWin,
|
||||||
-1,
|
-1,
|
||||||
wxPoint(rowLblW, colLblH),
|
wxDefaultPosition,
|
||||||
wxDefaultSize );
|
wxDefaultSize );
|
||||||
|
|
||||||
SetTargetWindow( m_gridWin );
|
SetTargetWindow( m_gridWin );
|
||||||
@@ -2398,6 +2399,10 @@ void wxGrid::OnPaint( wxPaintEvent& WXUNUSED(event) )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// This is just here to make sure that CalcDimensions gets called when
|
||||||
|
// the grid view is resized... then the size event is skipped to allow
|
||||||
|
// the box sizers to handle everything
|
||||||
|
//
|
||||||
void wxGrid::OnSize( wxSizeEvent& event )
|
void wxGrid::OnSize( wxSizeEvent& event )
|
||||||
{
|
{
|
||||||
CalcWindowSizes();
|
CalcWindowSizes();
|
||||||
|
Reference in New Issue
Block a user