Re: tabbing between controls
Re: tabbing between controls
- Subject: Re: tabbing between controls
- From: Patrick Machielse <email@hidden>
- Date: Thu, 27 Nov 2003 17:17:11 +0100
op 26-11-2003 06:49 schreef Michael Rothwell op cocoa-dev:
>
It looks like I can't tab into or out of a drawer. Is there a way to
>
enable this? My application has a main window with a pair of
>
NSTableViews inside an NSTabView. On the left is a drawer with its own
>
NSTableView. When I'm in one table view or the other, I'd like to be
>
able to switch focus from one to the other by hitting tab. This worked
>
when both table views were in the main window, but drawers seem to muck
>
it up.
Have you looked at the following NSView method?
+-+-+
- (BOOL)needsPanelToBecomeKey
Overridden by subclasses to return YES if the receiver requires its panel,
which might otherwise avoid becoming key, to become the key window so that
it can handle keyboard input. Such a subclass should also
overrideacceptsFirstResponder to return YES. NSView9s implementation returns
NO.
+-+-+
Subclassing NSTabView and overriding this method to return YES helped me
when I had trouble with tabbing in my app. (Still don't understand what is
going on in this method though. I found this info burried deep in the
internet)
Patrick
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.