Re: Tooltips - what a pathetic joke... :)
Re: Tooltips - what a pathetic joke... :)
- Subject: Re: Tooltips - what a pathetic joke... :)
- From: Steve Gehrman <email@hidden>
- Date: Mon, 16 Dec 2002 21:38:54 -0800
I tried this, but once you show the first tooltip, it doesn't change
until you move outside of the tooltip rect. The stringForToolTip
doesn't get called more than once for that rectangle. Is there a way
to force the tooltip to refresh on a mouseMove?
-steve
On Monday, December 16, 2002, at 09:14 PM,
email@hidden wrote:
I ran into something similar recently and the best way is to generate
your tooltips yourself.
Call [yourView addToolTipRect:[yourView frame] owner:someDelegate
userData:nil] when loading the view. This will add a single tooltip
rect for your whole view. The slowdown is associated with searching
through a large list of tooltip rects, I think. If your view can
change size, passing some huge rect instead of the frame should also
work.
Then in someDelegate, implement:
- (NSString*)view:(NSView*)view stringForToolTip:(NSToolTipTag)tag
point:(NSPoint)point userData:(void*)data;
Inside that, check point's coordinates in some efficient way and
return the appropriate tooltip NSString. For your specific case, you
should be able to do something more much efficient than Cocoa's
default rect list search. Tables should be very easy to do.
Tell me if it worked :-).
--
Steve Gehrman
email@hidden
http://www.cocoatech.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.