diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 27a8a37462..7b7d9d905e 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -438,6 +438,10 @@ void wxTextCtrl::SetValue(const wxString& value) WriteText(value); + // mark the control as being not dirty - we changed its text, not the + // user + DiscardEdits(); + // for compatibility, don't move the cursor when doing SetValue() SetInsertionPoint(0); }