]> git.saurik.com Git - wxWidgets.git/commitdiff
restored sending events from Replace/Remove/Write/AppendText() methods
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Oct 2006 23:16:53 +0000 (23:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Oct 2006 23:16:53 +0000 (23:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/textctrl.h
src/msw/textctrl.cpp

index 028032725d76cadd59244c7e75e7395754e0ffa5..ec1a9e0b4fdd8b538063bde6a13f64c41d1b537b 100644 (file)
@@ -231,7 +231,8 @@ protected:
 
     // replace the contents of the selection or of the entire control with the
     // given text
-    void DoWriteText(const wxString& text, int flags = SetValue_SelectionOnly);
+    void DoWriteText(const wxString& text,
+                     int flags = SetValue_SendEvent | SetValue_SelectionOnly);
 
     // set the selection possibly without scrolling the caret into view
     void DoSetSelection(long from, long to, bool scrollCaret = true);
index 53ec9740c7dcd70f1e2ebb391ebbdb78a5897ff3..4f698250278bad841bc09d9d5a6dffdfb5f79868 100644 (file)
@@ -802,7 +802,7 @@ void wxTextCtrl::DoSetValue(const wxString& value, int flags)
     // edit controls mostly)
     if ( (value.length() > 0x400) || (value != GetValue()) )
     {
-        DoWriteText(value, flags);
+        DoWriteText(value, flags /* doesn't include SelectionOnly here */);
 
         // mark the control as being not dirty - we changed its text, not the
         // user
@@ -1445,7 +1445,7 @@ void wxTextCtrl::Replace(long from, long to, const wxString& value)
     // Set selection and remove it
     DoSetSelection(from, to, false /* don't scroll caret into view */);
 
-    DoWriteText(value, SetValue_SelectionOnly);
+    DoWriteText(value);
 }
 
 void wxTextCtrl::Remove(long from, long to)