if ( !MSWCreateControl(_T("COMBOBOX"), msStyle) )
return FALSE;
- SetSize(pos.x, pos.y, size.x, size.y);
-
// A choice/combobox normally has a white background (or other, depending
// on global settings) rather than inheriting the parent's background colour.
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
SetValue(value);
}
+ // do this after appending the values to the combobox so that autosizing
+ // works correctly
+ SetSize(pos.x, pos.y, size.x, size.y);
+
// a (not read only) combobox is, in fact, 2 controls: the combobox itself
// and an edit control inside it and if we want to catch events from this
// edit control, we must subclass it as well