• 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: Setting textfields tab order programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

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

  • Prev by Date: Re: Changing font stuff in NSTextView + Undo
  • Next by Date: Re: Disabling FontPanel UI elements that we don't support
  • Previous by thread: Setting textfields tab order programmatically
  • Next by thread: Cocoa/Windows parallel dvlpmt
  • Index(es):
    • Date
    • Thread