• 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: NSTextView tab out of
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSTextView tab out of
      • From: "Marcus S. Zarra" <email@hidden>
References: 
 >NSTextView tab out of (From: "Marcus S. Zarra" <email@hidden>)

  • Prev by Date: Re: NSTextView tab out of [SOLVED]
  • Next by Date: Re: NSTextView tab out of
  • Previous by thread: NSTextView tab out of
  • Next by thread: Re: NSTextView tab out of
  • Index(es):
    • Date
    • Thread