]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
Disable some wxWebView tests that fail on the buildbot but not locally.
[wxWidgets.git] / src / msw / textctrl.cpp
index 850ea6ee9373dcb70428837b26f0064170bbea95..4792c8de81208969ee4a5abaa8e67205dd5f37b4 100644 (file)
@@ -1780,8 +1780,19 @@ bool wxTextCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
                     // fall through
 
                 case 0:
-                    if ( IsMultiLine() && vkey == VK_RETURN )
-                        return false;
+                    switch ( vkey )
+                    {
+                        case VK_RETURN:
+                            // This one is only special for multi line controls.
+                            if ( !IsMultiLine() )
+                                break;
+                            // fall through
+
+                        case VK_DELETE:
+                        case VK_HOME:
+                        case VK_END:
+                            return false;
+                    }
                     // fall through
                 case 2:
                     break;
@@ -1951,6 +1962,9 @@ WXLRESULT wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
                     //     live with it.
                     lRc = lDlgCode;
                 }
+                if (IsMultiLine())
+                    // Clear the DLGC_HASSETSEL bit from the return value
+                    lRc &= ~DLGC_HASSETSEL;
             }
             break;
 
@@ -2104,9 +2118,17 @@ wxSize wxTextCtrl::DoGetBestSize() const
     }
     //else: for single line control everything is ok
 
-    // we have to add the adjustments for the control height only once, not
-    // once per line, so do it after multiplication above
-    hText += EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) - cy;
+    // Text controls without border are special and have the same height as
+    // static labels (they also have the same appearance when they're disable
+    // and are often used as a sort of copyable to the clipboard label so it's
+    // important that they have the same height as the normal labels to not
+    // stand out).
+    if ( !HasFlag(wxBORDER_NONE) )
+    {
+        // we have to add the adjustments for the control height only once, not
+        // once per line, so do it after multiplication above
+        hText += EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) - cy;
+    }
 
     return wxSize(wText, hText);
 }