Re: selectText of NSTextField on focus
Re: selectText of NSTextField on focus
- Subject: Re: selectText of NSTextField on focus
- From: Quincey Morris <email@hidden>
- Date: Mon, 06 Jul 2015 22:09:54 +0000
On Jul 6, 2015, at 09:15 , Richard Charles <email@hidden> wrote:
>
> I have a NSTextField subclass that selects all of the text when the user clicks it.
Incidentally — this is the part where we make you sorry you asked the question — what are you trying to achieve here? Auto-self-selecting text fields are an incredibly annoying UI, if the user is ever likely to want to select only part of the field.
If you’re selecting everything to allow it to be copied easily, then a “Copy” button next to the text is probably a better idea.
If you’re selecting everything in order to cause it to be deleted on the first keystroke, a “Clear” button (probably an “x” icon button) similar to iOS search fields is probably a better idea.
That is, if at all possible, augment the standard behavior, don’t change it.
_______________________________________________
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