]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/valtext.cpp
Don't delete wxTaskBarIcon in wxMSW wxNotificationMessage if we don't own it.
[wxWidgets.git] / src / common / valtext.cpp
index 795df492d61539104a94a4daa09b7d7821140e0d..43c87eb446842040c0011db68a5d8f401c06d9e2 100644 (file)
@@ -33,6 +33,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#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;