X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c832ef4985a506330691e11ac13240355ed7195b..5a33bc097f84fdcf82ffbb874c111eabbbdb3911:/src/msw/combobox.cpp diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 7b65a4701d..0e81ed856a 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -304,6 +304,11 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { + // pretend that wxComboBox is hidden while it is positioned and resized and + // show it only right before leaving this method because otherwise there is + // some noticeable flicker while the control rearranges itself + m_isShown = FALSE; + // first create wxWin object if ( !CreateControl(parent, id, pos, size, style, validator, name) ) return FALSE; @@ -326,7 +331,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, // and now create the MSW control - if ( !MSWCreateControl(_T("COMBOBOX"), msStyle, pos, size, wxEmptyString, (WXDWORD)-1, false) ) + if ( !MSWCreateControl(_T("COMBOBOX"), msStyle) ) return FALSE; // A choice/combobox normally has a white background (or other, depending @@ -360,8 +365,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, ); } - // finally, show the combo box - Show(true); + // and finally, show the control + Show(TRUE); return TRUE; }