• 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: NSTextField: is it possible to avoid selecting contents on focus?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField: is it possible to avoid selecting contents on focus?


  • Subject: Re: NSTextField: is it possible to avoid selecting contents on focus?
  • From: Ricky Sharp <email@hidden>
  • Date: Fri, 4 Jul 2008 07:02:44 -0500


On Jul 4, 2008, at 6:01 AM, Paul Hoadley wrote:

The default behaviour of an NSTextField is apparently to select its contents on gaining focus. Is there any way to avoid this, and, say, put the cursor at the end of any content instead?


You should be able to set a delegate and use controlTextDidBeginEditing: Then, obtain the field editor and set the selection and cursor position as needed. See docs on that API for details.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

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


References: 
 >NSTextField: is it possible to avoid selecting contents on focus? (From: Paul Hoadley <email@hidden>)

  • Prev by Date: NSTextField: is it possible to avoid selecting contents on focus?
  • Next by Date: NSArrayController & Core Data bindings not loading data
  • Previous by thread: NSTextField: is it possible to avoid selecting contents on focus?
  • Next by thread: NSArrayController & Core Data bindings not loading data
  • Index(es):
    • Date
    • Thread