How to set keyboard focus to in NSView in Carbon Application?
How to set keyboard focus to in NSView in Carbon Application?
- Subject: How to set keyboard focus to in NSView in Carbon Application?
- From: xue zhiy <email@hidden>
- Date: Wed, 29 Apr 2009 17:14:31 +0800
I create a custom NSView in my Carbon Application. For embed it into
Carbon window, i create a HICocoaview for it.
My question is: How to set keyboard focus to the NSView?
I can get the focus after i mouse click the NSView. I try to set focus
by SetKeyboardFocus( windowRef, pHICocoaView,
kControlFocusNextPart ). But it doesn't work.
HIViewRef pHICocoaView;
NSView* pView = [[MyCustomNSView alloc] initWith: this];
HICocoaViewCreate(pView, 0, &pHICocoaView);
HIViewAddSubview(pContentView, mpHICocoaView);
Thanks for you help.
Sincerely ,
Bruce
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden