]> git.saurik.com Git - wxWidgets.git/commitdiff
Eliminate flashing when writing text, by clearing instead of selecting all.
authorJulian Smart <julian@anthemion.co.uk>
Wed, 26 Jun 2002 22:15:20 +0000 (22:15 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 26 Jun 2002 22:15:20 +0000 (22:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/textctrl.cpp

index f40f6c861b034e9301e1992ba3f2e750b67b83c8..3824a797f4c310e5275900de3a40ba85556efe40 100644 (file)
@@ -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());