diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index cbba705546..7e51d7a9ef 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -6497,8 +6497,15 @@ bool wxGrid::UseNativeColHeader(bool native) CreateColumnWindow(); if ( m_useNativeHeader ) + { SetNativeHeaderColCount(); + wxHeaderCtrl* const colHeader = GetGridColHeader(); + colHeader->SetBackgroundColour( GetLabelBackgroundColour() ); + colHeader->SetForegroundColour( GetLabelTextColour() ); + colHeader->SetFont( GetLabelFont() ); + } + CalcWindowSizes(); return true; @@ -7980,6 +7987,10 @@ void wxGrid::SetLabelTextColour( const wxColour& colour ) if ( m_labelTextColour != colour ) { m_labelTextColour = colour; + + if ( IsUsingNativeHeader() ) + GetGridColHeader()->SetForegroundColour( colour ); + if ( ShouldRefresh() ) { m_rowLabelWin->Refresh(); @@ -7991,6 +8002,10 @@ void wxGrid::SetLabelTextColour( const wxColour& colour ) void wxGrid::SetLabelFont( const wxFont& font ) { m_labelFont = font; + + if ( IsUsingNativeHeader() ) + GetGridColHeader()->SetFont( font ); + if ( ShouldRefresh() ) { m_rowLabelWin->Refresh();