]> git.saurik.com Git - wxWidgets.git/commitdiff
proper focus lost for multiline textfields and having all demanding a focusrect
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 2 Mar 2011 21:17:43 +0000 (21:17 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 2 Mar 2011 21:17:43 +0000 (21:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/textctrl.mm

index 6b5e754c332f6fbb14457e2d26815bb39b5a96eb..7aa04cf34f564ec7b37789fa72397d0ce57a1c31 100644 (file)
@@ -218,6 +218,16 @@ protected :
     return [self isEditable];
 }
 
+- (void)textDidEndEditing:(NSNotification *)aNotification
+{
+    wxUnusedVar(aNotification);
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
+    if ( impl )
+    {
+        impl->DoNotifyFocusEvent( false, NULL );
+    }
+}
+
 @end
 
 @implementation wxNSTextField
@@ -764,6 +774,7 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer,
 
         c = new wxNSTextFieldControl( wxpeer, wxpeer, v );
     }
+    c->SetNeedsFocusRect( true );
 
     return c;
 }