From 0d1c4edee3bc79b4f6bd33802f8858a0602141ab Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 27 Dec 2007 18:41:40 +0000 Subject: [PATCH] Also get header button height right git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 7238e3a4f8..6fafd57a25 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -1281,14 +1281,16 @@ bool wxDataViewHeaderWindowMSW::Create( wxDataViewCtrl *parent, wxWindowID id, m_owner = parent; m_scrollOffsetX = 0; - m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this ) + 10; + m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this ); int x = pos.x == wxDefaultCoord ? 0 : pos.x, y = pos.y == wxDefaultCoord ? 0 : pos.y, w = size.x == wxDefaultCoord ? 1 : size.x, - h = size.y == wxDefaultCoord ? m_buttonHeight : size.y; + h = m_buttonHeight; - if ( !CreateControl(parent, id, pos, size, 0, wxDefaultValidator, name) ) + wxSize new_size(w,h); + + if ( !CreateControl(parent, id, pos, new_size, 0, wxDefaultValidator, name) ) return false; // create the native WC_HEADER window: -- 2.45.2