Re: setFieldEditor, yes & no sort of
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