• 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
next TextField with Enter key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

next TextField with Enter key


  • Subject: next TextField with Enter key
  • From: Thom Meijer <email@hidden>
  • Date: Thu, 6 Oct 2005 21:30:11 +0200

Hello there!

I have a few text fields and I know how to jump between them with Tab key
and Shift-Tab. That is, in IB, just control-drag from the current one to the
following, connect nextKeyView outlet and that's it. But how can I achieve
similiar behavior with Enter key? Preferably also in IB?

I read http://lists.apple.com/archives/cocoa-dev/2005/Sep/msg01208.html

- (IBAction)yourButtonAction:(id)sender
{
[[sender window] makeFirstResponder:[sender nextValidKeyView]];
}

but somehow it doesn't work for me. I know that yourButtonAction is called
when I hit enter but it doesn't advance to next field.

Thanks for any suggestions.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Undo / Redo
  • Next by Date: Re: Flipping an NSImage (even more trouble with size)
  • Previous by thread: Re: Undo / Redo
  • Next by thread: Re: next TextField with Enter key
  • Index(es):
    • Date
    • Thread