]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/combobox.cpp
fixed scrollbar refresh
[wxWidgets.git] / src / univ / combobox.cpp
index 40020d468ad6ecb8d1995149af65fc5457c6b746..92dc487e4ea459a0f86121179c47c82a19344973 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     15.12.00
 // RCS-ID:      $Id$
-// Copyright:   (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -46,6 +46,7 @@
     #include "wx/combobox.h"
     #include "wx/listbox.h"
     #include "wx/textctrl.h"
+    #include "wx/bmpbuttn.h"
 
     #include "wx/validate.h"
 #endif
@@ -87,7 +88,7 @@ public:
         SetBitmapSelected(bmpPressed);
         SetBitmapDisabled(bmpDisabled);
 
-        SetSize(bmpNormal.GetWidth(), bmpNormal.GetHeight());
+//        SetSize(bmpNormal.GetWidth(), bmpNormal.GetHeight());
     }
 
 protected:
@@ -200,6 +201,8 @@ void wxComboControl::Init()
     m_popup = (wxComboPopup *)NULL;
     m_winPopup = (wxPopupComboWindow *)NULL;
     m_isPopupShown = FALSE;
+    m_btn = NULL;
+    m_text = NULL;
 }
 
 bool wxComboControl::Create(wxWindow *parent,
@@ -325,8 +328,11 @@ bool wxComboControl::Show(bool show)
     if ( !wxControl::Show(show) )
         return FALSE;
 
-    m_btn->Show(show);
-    m_text->Show(show);
+    if (m_btn)
+        m_btn->Show(show);
+    
+    if (m_text)
+        m_text->Show(show);
 
     return TRUE;
 }