• 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: Textfield
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Textfield


  • Subject: Re: Textfield
  • From: Wdyp <email@hidden>
  • Date: Sun, 2 Dec 2007 18:54:32 +0100

I have a window with 5 textfield to enter a serial number of 5x5
characters.
When I entrer 5 characters in a textfield, I want that the cursor
goes automatically in the next textfields.
How can I make this ?
Thanks


You could implement this delegate method for your text field:

-(void)controlTextDidChange:(NSNotification *)aNotification {

    id mySenderTextField = [aNotification object];

if ( [[mySenderTextField stringValue] length] == 5)
[[mySenderTextField window] makeFirstResponder:[mySenderTextField nextValidKeyView]];
}


Flofl.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Single column NSListView bug?
  • Next by Date: Re: SplashScreen
  • Previous by thread: Re: Textfield
  • Next by thread: Managed Object URI's not working?
  • Index(es):
    • Date
    • Thread