Re: Tab and Enter in NSTextView
Re: Tab and Enter in NSTextView
- Subject: Re: Tab and Enter in NSTextView
- From: Mike Abdullah <email@hidden>
- Date: Sun, 3 Sep 2006 19:30:39 +0100
Thanks :)
At the moment, I'm looking at the keyCode method of NSEvent. It
seems the Tab key is 48, however I see no constants I can use other
than my own #define. Am I missing something?
Mike.
On 3 Sep 2006, at 19:17, I. Savant wrote:
You could subclass NSTextView and override -keyDown: ... In this
method, if the key is "tab", call [self nextKeyView]; ...
otherwise, call [super keyDown:...];
I hope this helps.
--
I.S.
On Sep 3, 2006, at 2:10 PM, Mike Abdullah wrote:
I have an NSTextView in my app. I wish to modify it so that using
the Tan key will not insert a tab, but will move to the next control.
I know I can do this using setFieldEditor:
However, this also disables use of the enter key. I want to be
able to still use the enter key to add new lines of text. Any ideas?
Mike.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
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