Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting textfields tab order programmatically



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.

References: 
 >Setting textfields tab order programmatically (From: Bertrand Mansion <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.