• 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: selectText of NSTextField on focus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: selectText of NSTextField on focus
      • From: Richard Charles <email@hidden>
References: 
 >selectText of NSTextField on focus (From: Richard Charles <email@hidden>)

  • Prev by Date: Re: selectText of NSTextField on focus
  • Next by Date: Re: Swift Enums and CoreData
  • Previous by thread: Re: selectText of NSTextField on focus
  • Next by thread: Re: selectText of NSTextField on focus
  • Index(es):
    • Date
    • Thread