X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90497db95b7e8ddbc6e0d1b66ce9d76283bd5ebf..f2049b683752950d1fe91aec07318e7f2122ff16:/src/common/valtext.cpp diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 795df492d6..43c87eb446 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -33,6 +33,8 @@ #include #include +#include "wx/combo.h" + // ---------------------------------------------------------------------------- // global helpers // ---------------------------------------------------------------------------- @@ -125,8 +127,16 @@ wxTextEntry *wxTextValidator::GetTextEntry() } #endif +#if wxUSE_COMBOCTRL + if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboCtrl))) + { + return (wxComboCtrl*)m_validatorWindow; + } +#endif + wxFAIL_MSG( - wxT("wxTextValidator can only be used with wxTextCtrl or wxComboBox") + "wxTextValidator can only be used with wxTextCtrl, wxComboBox, " + "or wxComboCtrl" ); return NULL;