Tool tips in NSTableView
Tool tips in NSTableView
- Subject: Tool tips in NSTableView
- From: Max Horn <email@hidden>
- Date: Sat, 19 May 2001 17:02:17 +0200
I want to display tool tips for items in a NSTableView (and also in a
NSOutlineView, but I figure the solution might be similiar). That is,
every item will have a different tool tip...
Looking at the AppKit header files revealed that NSView has a method
- (NSToolTipTag)addToolTipRect:(NSRect)aRect owner:(id)anObject
userData:(void *)data;
which looks helpful. However, as so often, the docs only say
"Description forthcoming" :/ and I have no clue how I actually would
use that method. Userdata seems fair enough, but what exactly does
aRect specify? I figure I have to subclass NSToolTipOwner, and handle:
- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag
point:(NSPoint)point userData:(void *)data;
Userdata is quite clear; and with point, I guess I could use one
handle for my whole tableview, which would be nice; but still,
"aRect" puzzles me. Should I pass the full view rect of the view, or
a rect of the item or what?!?
--
-----------------------------------------------
Max Horn
C++/ObjC/Java Developer
email: <
mailto:email@hidden>
phone: (+49) 6151-494890