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

NSTextField Selection


  • Subject: NSTextField Selection
  • From: koko <email@hidden>
  • Date: Fri, 15 Jun 2012 13:31:51 -0600

I have an NSTextField whose width is just enough for M and W.  The filled can get set with text longer than one character. The user is to replace this multi-character text with a single character.

So, without having to double click to select all text before entering the single character replacement what is the best way to programmatically select the text?

Do I subclass NSTextField , define a tracking rect and look for mouse entered and then -selectText?  Seems extreme. Is there an easy way?

-koko
_______________________________________________

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

  • Follow-Ups:
    • Re: NSTextField Selection
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: How to override [NSTextField paste:]
  • Next by Date: Re: NSTextField Selection
  • Previous by thread: Re: updates for retina
  • Next by thread: Re: NSTextField Selection
  • Index(es):
    • Date
    • Thread