supporting kill focus for single line text controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -82,6 +82,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
|
||||||
|
{
|
||||||
|
wxUnusedVar(aNotification);
|
||||||
|
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
|
||||||
|
if ( impl )
|
||||||
|
{
|
||||||
|
impl->DoNotifyFocusEvent( false, NULL );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface wxNSTextView : NSScrollView
|
@interface wxNSTextView : NSScrollView
|
||||||
@@ -209,21 +219,16 @@ typedef BOOL (*wxOSX_insertNewlineHandlerPtr)(NSView* self, SEL _cmd, NSControl
|
|||||||
|
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
|
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
|
||||||
{
|
{
|
||||||
|
wxUnusedVar(aNotification);
|
||||||
|
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
|
||||||
if ( impl )
|
if ( impl )
|
||||||
{
|
{
|
||||||
wxWindow* wxpeer = (wxWindow*) impl->GetWXPeer();
|
impl->DoNotifyFocusEvent( false, NULL );
|
||||||
if ( wxpeer ) {
|
|
||||||
wxFocusEvent event(wxEVT_KILL_FOCUS, wxpeer->GetId());
|
|
||||||
event.SetEventObject( wxpeer );
|
|
||||||
event.SetWindow( wxpeer );
|
|
||||||
wxpeer->HandleWindowEvent( event );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
*/
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// wxNSTextViewControl
|
// wxNSTextViewControl
|
||||||
|
Reference in New Issue
Block a user