]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/srchctlg.cpp
Skip mouse events outside of item area in wxDataViewCtrl.
[wxWidgets.git] / src / generic / srchctlg.cpp
index 494ae1537f76d125fe5c95537a517ea974be1949..65259a722713618644fb82034a5fb8d2edfa73fd 100644 (file)
@@ -5,7 +5,7 @@
 // Created:     2006-02-19
 // RCS-ID:      $Id$
 // Copyright:   Vince Harron
-// License:     wxWindows licence
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx.h".
@@ -242,6 +242,14 @@ protected:
         wxCommandEvent event(m_eventType, m_search->GetId());
         event.SetEventObject(m_search);
 
+        if ( m_eventType == wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN )
+        {
+            // it's convenient to have the string to search for directly in the
+            // event instead of having to retrieve it from the control in the
+            // event handler code later, so provide it here
+            event.SetString(m_search->GetValue());
+        }
+
         GetEventHandler()->ProcessEvent(event);
 
         m_search->SetFocus();