• 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: setFieldEditor, yes & no sort of
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setFieldEditor, yes & no sort of


  • Subject: Re: setFieldEditor, yes & no sort of
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 24 Oct 2005 10:15:32 -0700


On Oct 23, 2005, at 7:48 PM, Scott Ribe wrote:

I need a text input area which handles multiple lines, and thus takes return
as a carriage return, but otherwise functions like a plain text area,
interpreting tab and shift-tab to move to next/previous fields. I'm looking
at the docs on NSTextField, NSTextView, NSText, NSWindow and so on but I
don't see a straightforward way to do this. What am I missing?



If you use an NSTextField, you can act as its delegate and implement control:textView:doCommandBySelector:. Look for the selector @selector(insertNewline:) and handle it by calling insertNewlineIgnoringFieldEditor: on the text view, and returning YES; otherwise return NO. There are other combinations but this sounds like the closest to what you are looking for.


Douglas Davidson

_______________________________________________
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: 
 >setFieldEditor, yes & no sort of (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: How to set width of "tab" (\t) in NSTextView?
  • Next by Date: Re: NSMenu menuBarHeight is 0?
  • Previous by thread: setFieldEditor, yes & no sort of
  • Next by thread: Building a view transparent to dragging
  • Index(es):
    • Date
    • Thread