virtual bool Enable(bool enable = true);
virtual bool Show(bool show = true);
virtual bool SetFont(const wxFont& font);
+#if wxUSE_VALIDATORS
+ virtual void SetValidator(const wxValidator &validator);
+ virtual wxValidator *GetValidator();
+#endif // wxUSE_VALIDATORS
// wxTextCtrl methods - for readonly combo they should return
// without errors.
}
#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
// ----------------------------------------------------------------------------