Greetings,

I have a custom NSView, which draws a pie chart. I want to implement a tooltip for each slice of the pie to indicate information about that slice for the user. The slices are not rectangular, they are triangular. Thus, I can't just use addToolTipRect:owner:userData.

So I had this clever idea that I would track mouseMoved events in the custom view, and, when the mouse point is within one of the slices, I would set the tooltip for the entire view to the string for that slice. I figure it'll get reset when it moves to another slice anyway, so it's all good.

The only problem is, my tooltip refuses to show up.

I'm calling [NSView setToolTip:] and I also have a tracking rect, and I am receiving the mouseMoved events just fine. Is there some kind of known reason my tooltips won't show up in this scenario? I've set tooltips on custom views before without the mouse tracking and not had much trouble. Alternatively, can someone recommend a smarter way to do this?

Thanks.






_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to