]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/combog.cpp
refresh tree item after changing its icon so that the change is visible
[wxWidgets.git] / src / generic / combog.cpp
index d99937a3feb499503d9d10fb7f16b92372a24434..5559bff3c81f1e0d7b1707acae63df27f34231fd 100644 (file)
@@ -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 )