// 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
// 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;
}
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 )