X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a57d600f1aa4bae88f4c9b8d89a35332c412939e..511bec9640556c23969942f7912ada90c19d36ac:/src/generic/combog.cpp diff --git a/src/generic/combog.cpp b/src/generic/combog.cpp index d99937a3fe..5559bff3c8 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; } @@ -288,11 +288,7 @@ void wxGenericComboControl::OnMouseEvent( wxMouseEvent& event ) if ( PreprocessMouseEvent(event,handlerFlags) ) return; -#ifdef __WXMSW__ - const bool ctrlIsButton = true; -#else - const bool ctrlIsButton = false; -#endif + const bool ctrlIsButton = wxPlatformIs(wxMSW); if ( ctrlIsButton && (m_windowStyle & (wxCC_SPECIAL_DCLICK|wxCB_READONLY)) == wxCB_READONLY )