From: Stefan Csomor Date: Wed, 2 Mar 2011 21:17:43 +0000 (+0000) Subject: proper focus lost for multiline textfields and having all demanding a focusrect X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9159a25799b839411ea878989dd4ad66cfb7c6b9?ds=inline proper focus lost for multiline textfields and having all demanding a focusrect git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 6b5e754c33..7aa04cf34f 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -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; }