• 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: Newbie Question - selecting textFields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Question - selecting textFields


  • Subject: Re: Newbie Question - selecting textFields
  • From: Hasan Diwan <email@hidden>
  • Date: Tue, 26 Nov 2002 14:28:03 -0500

NSWindow *window; // window containing the textfields tf1..tf4
[window makeFirstResponder:tf1];
That's untested, but should work.

On Tuesday, November 26, 2002, at 12:24 AM, Tom Gray wrote:

> Hi, and as always, thanks!
>
> I have four NSTextFields in a window. After the user enters a value
> and hits return or tab, I validate the value. If the value is not
> valid I want to reselect the text in that NSTextField and make it the
> current text field.
>
> My problem is, I cannot make it the current text field. The next text
> field (as set in IB) becomes the current text field after the user
> hits tab or return.
>
> How do I programatically select one of my NSTextFields to be the "key"
> text field?
>
> Tom Gray
> -------------
> email@hidden
> or
> email@hidden
> _______________________________________________
> 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.
>
Hasan Diwan
OpenPGP KeyID: 0xBE42DCA6
Fingerprint: 1CB0 47E3 0A24 DAC1 DCCA 4225 F166 40C2 BE42 DCA6
http://www.cs.rpi.edu/~diwanh/gpg.key

[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig]
_______________________________________________
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.

  • Follow-Ups:
    • Re: Newbie Question - selecting textFields
      • From: Vince DeMarco <email@hidden>
References: 
 >Newbie Question - selecting textFields (From: Tom Gray <email@hidden>)

  • Prev by Date: Re: transparent views and window shadow interference
  • Next by Date: Re: How to know if the System Preferences app is running
  • Previous by thread: Re: Newbie Question - selecting textFields
  • Next by thread: Re: Newbie Question - selecting textFields
  • Index(es):
    • Date
    • Thread