From dd1c16314e09a49b6afdc15fadf001acc75856bd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 8 Oct 2006 23:16:53 +0000 Subject: [PATCH] restored sending events from Replace/Remove/Write/AppendText() methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/textctrl.h | 3 ++- src/msw/textctrl.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 028032725d..ec1a9e0b4f 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -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); diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 53ec9740c7..4f69825027 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -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) -- 2.45.2