• 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
Getting a double-click on a text label
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting a double-click on a text label


  • Subject: Getting a double-click on a text label
  • From: Graham Cox <email@hidden>
  • Date: Mon, 18 Apr 2016 10:45:07 +1000

Hi al,

Here’s something I thought would be trivial, turns out to be non-obvious.

I have a text label that’s not normally editable text, but it can be made editable in some circumstances. It would be useful if a double-click were a shortcut to make it editable, but I can’t see a quick way to set that up, other than subclassing NSTextField. I thought NSControl had a -setDoubleAction: method, but in checking for that, I can’t see it anywhere from NSTextField and NSResponder, so I was probably thinking of NSMatrix.

Is there a way to do this other than subclassing?

—Graham



_______________________________________________

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: Getting a double-click on a text label
      • From: Ryan Dignard <email@hidden>
  • Prev by Date: Re: Does NSString's "- initWithContentsOfURL:usedEncoding:error:" use the tightest encoding possible?
  • Next by Date: Re: Getting a double-click on a text label
  • Previous by thread: Window Resizing
  • Next by thread: Re: Getting a double-click on a text label
  • Index(es):
    • Date
    • Thread