Re: NSTextView tab out of
Re: NSTextView tab out of
- Subject: Re: NSTextView tab out of
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 2 Mar 2006 15:31:01 -0700
On Mar 2, 2006, at 3:07 PM, Marcus S. Zarra wrote:
What would be the best approach to altering an nstextview so that when
a tab is pressed while it has focus the tab changes the first
responder instead of inserting a tab into the text view?
Implement the delegate method -textView:doCommandBySelector:, watch
for the -insertTab: selector, and if they're equal, then change the
key view and return NO. Otherwise, have the method return YES. You
shouldn't need to subclass or otherwise modify a text view to do
this, although if you want to disallow line feeds as well, then you
should be able to put the text view into field editor mode instead.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden