Re: NSTextField Focus
Re: NSTextField Focus
- Subject: Re: NSTextField Focus
- From: Edward Fink <email@hidden>
- Date: Sat, 21 Sep 2002 14:33:50 -0400
This works. However, I also have another textbox displaying output. I
would still like to be able to select(copy) text within that textbox.
With the solution below I cannot because the textfield will ALWAYS have
focus. This is what I want, but not exactly. If the user hits "enter"
I do not want focus to leave the textbox, However I still need the
ability to select text in the other textbox....or perhaps be able to
hit a button. Does this make sense?
On Saturday, September 21, 2002, at 02:17 PM, Marco Binder wrote:
I guess you can use NSControl4s delegate method -
(BOOL)control:(NSControl *)control textShouldEndEditing:(NSText
*)fieldEditor
Just return no, so editing will not end. If you want to clear the
textfield upon hitting enter or if you want to process the entered
data upon "Enter", this is also the place to put your code.
marco
Am Samstag, 21.09.02 um 19:32 Uhr schrieb Edward Fink:
I have an app which has an NSTextField which is the 1st responder.
When the user type data in and hits enter the textfield looses
"focus". How can I fix this? When the user hits enter I do not want
the textfield to loose "focus". In fact I want the textfield to
always have focus as long as that window is active.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
|\ /| E-Mail: email@hidden WWW: www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.