Getting a double-click on a text label
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