• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Tab and Enter in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Tab and Enter in NSTextView (From: Mike Abdullah <email@hidden>)
 >Re: Tab and Enter in NSTextView (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Tab and Enter in NSTextView
  • Next by Date: Re: Tab and Enter in NSTextView
  • Previous by thread: Re: Tab and Enter in NSTextView
  • Next by thread: Re: Tab and Enter in NSTextView
  • Index(es):
    • Date
    • Thread