• 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: How to check if NSTextField is selected?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check if NSTextField is selected?


  • Subject: Re: How to check if NSTextField is selected?
  • From: Peter Schart <email@hidden>
  • Date: Thu, 28 Sep 2006 10:36:39 -0500


On Sep 28, 2006, at 10:24 AM, Jordan Evans wrote:

How do I query NSTextField to know if it's the selected text field in
the interface.  You know, when it has the blue highlighting around it?

Ask the window what the first responder is and compare it to your NSTextField object. Something like:


BOOL textFieldIsSelected = ([mainWindow firstResponder] == textFieldObject);

-pete

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: How to check if NSTextField is selected?
      • From: Shawn Erickson <email@hidden>
References: 
 >How to check if NSTextField is selected? (From: "Jordan Evans" <email@hidden>)

  • Prev by Date: Re: Help with checkboxes needed
  • Next by Date: Re: Help with checkboxes needed
  • Previous by thread: Re: Re: How to check if NSTextField is selected?
  • Next by thread: Re: How to check if NSTextField is selected?
  • Index(es):
    • Date
    • Thread