Re: Setting textfields tab order programmatically
Re: Setting textfields tab order programmatically
- Subject: Re: Setting textfields tab order programmatically
- From: Nicko van Someren <email@hidden>
- Date: Sat, 31 Jan 2004 20:01:04 +0000
On 31 Jan 2004, at 18:06, Bertrand Mansion wrote:
I create a few textfields programmatically and add them one after the
other
(in a while loop) to a custom view. I would like that when a user
starts
editing one of the textfield, if he presses the tab key, the next
textfield
becomes edited. How can I do that programmatically, not knowing in
advance
how many textfields will compose the complete form ?
As you add the text fields remember the last one you added. When you
add another use the setNextKeyView: message on the previous item to add
the new one to the end of the key view loop. If you are making the
window or all of it's useful content programatically then you can use
setInitialFirstRepsonder: on that window to point to the first of your
text fields.
Nicko
_______________________________________________
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.