]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/combog.cpp
Border corrections
[wxWidgets.git] / src / generic / combog.cpp
index 674e5f1806286c21dcf2012751b14f68acef7dd8..f2cb9abf6789915269f1095d50e8901b1087a2c5 100644 (file)
@@ -32,6 +32,7 @@
     #include "wx/combobox.h"
     #include "wx/dcclient.h"
     #include "wx/settings.h"
     #include "wx/combobox.h"
     #include "wx/dcclient.h"
     #include "wx/settings.h"
+    #include "wx/textctrl.h"
 #endif
 
 #include "wx/dcbuffer.h"
 #endif
 
 #include "wx/dcbuffer.h"
@@ -159,7 +160,8 @@ bool wxGenericComboCtrl::Create(wxWindow *parent,
     border = wxBORDER_NONE;
 
     Customize( wxCC_BUTTON_OUTSIDE_BORDER |
     border = wxBORDER_NONE;
 
     Customize( wxCC_BUTTON_OUTSIDE_BORDER |
-               wxCC_NO_TEXT_AUTO_SELECT );
+               wxCC_NO_TEXT_AUTO_SELECT |
+               wxCC_BUTTON_STAYS_DOWN );
 
 #endif
 
 
 #endif
 
@@ -391,6 +393,7 @@ void wxGenericComboCtrl::SetCustomPaintWidth( int width )
             tc->RemoveEventHandler(m_textEvtHandler);
             delete m_textEvtHandler;
 
             tc->RemoveEventHandler(m_textEvtHandler);
             delete m_textEvtHandler;
 
+#if wxUSE_VALIDATORS
             wxValidator* pValidator = tc->GetValidator();
             if ( pValidator )
             {
             wxValidator* pValidator = tc->GetValidator();
             if ( pValidator )
             {
@@ -399,6 +402,7 @@ void wxGenericComboCtrl::SetCustomPaintWidth( int width )
                 delete pValidator;
             }
             else
                 delete pValidator;
             }
             else
+#endif
             {
                 CreateTextCtrl( tcCreateStyle, wxDefaultValidator );
             }
             {
                 CreateTextCtrl( tcCreateStyle, wxDefaultValidator );
             }