]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/combocmn.cpp
Docstring tweaks
[wxWidgets.git] / src / common / combocmn.cpp
index a99beabd8827f6a33592ea6868a3066e2e6a6730..637c30952bd1d6815ae8ef3bdde503f581c004cf 100644 (file)
@@ -828,7 +828,7 @@ wxComboCtrlBase::CreateTextCtrl(int style, const wxValidator& validator)
             m_ignoreEvtText = 0;
 
         m_text = new wxTextCtrl(this, wxID_ANY, m_valueString,
-                                wxDefaultPosition, wxDefaultSize,
+                                wxDefaultPosition, wxSize(10,-1),
                                 style, validator);
     }
 }
@@ -1149,6 +1149,26 @@ void wxComboCtrlBase::DoSetToolTip(wxToolTip *tooltip)
 }
 #endif // wxUSE_TOOLTIPS
 
+#if wxUSE_VALIDATORS
+void wxComboCtrlBase::SetValidator(const wxValidator& validator)
+{
+    wxTextCtrl* textCtrl = GetTextCtrl();
+
+    if ( textCtrl )
+        textCtrl->SetValidator( validator );
+}
+
+wxValidator* wxComboCtrlBase::GetValidator()
+{
+    wxTextCtrl* textCtrl = GetTextCtrl();
+
+    if ( textCtrl )
+        return textCtrl->GetValidator();
+
+    return wxControl::GetValidator();
+}
+#endif // wxUSE_VALIDATORS
+
 // ----------------------------------------------------------------------------
 // painting
 // ----------------------------------------------------------------------------
@@ -1238,7 +1258,7 @@ void wxComboCtrlBase::PrepareBackground( wxDC&, const wxRect&, int ) const
 }
 #endif
 
-void wxComboCtrlBase::DrawButton( wxDC& dc, const wxRect& rect, bool paintBg )
+void wxComboCtrlBase::DrawButton( wxDC& dc, const wxRect& rect, int paintBg )
 {
     int drawState = m_btnState;