]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
Remove double buffering from wxWebViewIE as this is handled by the web browser contro...
[wxWidgets.git] / src / msw / textctrl.cpp
index 4e2171fbfe363054036f619dd1ce1bf6f349da0a..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;
@@ -2107,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);
 }