Re: How to display tool-tip on demand
Re: How to display tool-tip on demand
- Subject: Re: How to display tool-tip on demand
- From: Jens Alfke <email@hidden>
- Date: Sun, 05 Aug 2012 17:44:09 -0700
On Aug 5, 2012, at 4:56 PM, Michael Crawford <email@hidden> wrote:
> Is there a way to display a tool-tip in response to an event? Currently I'm waiting for the default timeout but if the user clicks on a particular cell (yes this is an NSTableView), I'd like to display the tool-tip immediately. The contents of the NSTableColumn in question are not editable so I don't need the mouse click for anything else.
IIRC, no — I don't think there is public API to make tooltips come up on demand.
I had to do some unorthodox stuff to implement tooltips in the Mac version of Chrome a few years ago, which I did by copying WebKit's implementation, but this uses some internal AppKit methods. I wouldn't recommend you use them. (If you're really determined you could look it up in the WebKit sources, but I don't remember where the tooltip code is.)
—Jens
_______________________________________________
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