From f1fbff28875d7bc58fa493f5d83d9a1de38e002e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 26 Jun 2002 22:15:20 +0000 Subject: [PATCH] Eliminate flashing when writing text, by clearing instead of selecting all. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index f40f6c861b..3824a797f4 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -678,7 +678,10 @@ void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly) { if ( !selectionOnly ) { - SetSelection(-1, -1); + //SetSelection(-1, -1); + // This eliminates an annoying flashing effect + // when replacing all text. + Clear(); } ::SendMessage(GetHwnd(), EM_REPLACESEL, 0, (LPARAM)valueDos.c_str());