Re: Textfield
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