From 93f7f8be7ee1df8f5d449a072036f2433a387ab9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Sat, 20 May 2006 23:27:12 +0000 Subject: [PATCH] [ 1492036 ] Fix incorrect wxComboCtrl minimum size. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/combog.cpp | 18 +++++++++--------- src/msw/combo.cpp | 22 +++++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/generic/combog.cpp b/src/generic/combog.cpp index d99937a3fe..84d31db480 100644 --- a/src/generic/combog.cpp +++ b/src/generic/combog.cpp @@ -148,13 +148,13 @@ bool wxGenericComboControl::Create(wxWindow *parent, // create main window if ( !wxComboCtrlBase::Create(parent, - id, - value, - wxDefaultPosition, - wxDefaultSize, - style | wxFULL_REPAINT_ON_RESIZE, - wxDefaultValidator, - name) ) + id, + value, + pos, + size, + style | wxFULL_REPAINT_ON_RESIZE, + wxDefaultValidator, + name) ) return false; // Create textctrl, if necessary @@ -166,8 +166,8 @@ bool wxGenericComboControl::Create(wxWindow *parent, // Set background SetBackgroundStyle( wxBG_STYLE_CUSTOM ); // for double-buffering - // SetSize should be called last - SetSize(pos.x,pos.y,size.x,size.y); + // SetBestSize should be called last + SetBestSize(size); return true; } diff --git a/src/msw/combo.cpp b/src/msw/combo.cpp index 92711ac9d6..7ebac8b6aa 100644 --- a/src/msw/combo.cpp +++ b/src/msw/combo.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: combo.cpp +// Name: src/msw/combo.cpp // Purpose: wxMSW wxComboCtrl // Author: Jaakko Salli // Modified by: @@ -119,13 +119,13 @@ bool wxComboCtrl::Create(wxWindow *parent, // create main window if ( !wxComboCtrlBase::Create(parent, - id, - value, - wxDefaultPosition, - wxDefaultSize, - style | wxFULL_REPAINT_ON_RESIZE, - wxDefaultValidator, - name) ) + id, + value, + pos, + size, + style | wxFULL_REPAINT_ON_RESIZE, + wxDefaultValidator, + name) ) return false; if ( style & wxCC_STD_BUTTON ) @@ -140,8 +140,8 @@ bool wxComboCtrl::Create(wxWindow *parent, // Prepare background for double-buffering SetBackgroundStyle( wxBG_STYLE_CUSTOM ); - // SetSize should be called last - SetSize(pos.x,pos.y,size.x,size.y); + // SetBestSize should be called last + SetBestSize(size); return true; } @@ -448,7 +448,7 @@ void wxComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) ) &r); drawButBg = false; - } + } // Standard button rendering DrawButton(dc,rectb,drawButBg); -- 2.45.2