On 26 Jun 2009, at 08:01, PKameo wrote:
How do you add a tool-tip to a NSTabViewItem? I tried the following,
but
that didn't work right.
[[tabViewItem view] setToolTip:toolTip];
//Where tabViewItem is of type NSTabViewItem* and toolTip is of type
NSString*
[tabViewItem view] returns the content view of the tab (i.e, what gets
displayed when the tab is selected), not a view representing the tab
itself.
Tab view items don't support attributed labels, so I suspect there
isn't any easy way of accomplishing this task. If you really need it,
you can probably subclass NSTabView and do something awful with mouse-
moved events and/or tracking rects. However, given as how there aren't
any other applications out there where NSTabViews have tooltips, I
wouldn't sweat it.
_______________________________________________
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 arch...@mail-archive.com