Re: NSTextField: is it possible to avoid selecting contents on focus?
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