• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Tool tips in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Tool tips in NSTableView
      • From: Chuck Pisula <email@hidden>
    • Crossposting in Omni and Apple mailing list (was: Re: Tool tips in NSTableView)
      • From: Uli Zappe <email@hidden>
  • Prev by Date: Re: Chasing/Spinning arrows view
  • Next by Date: Stupid question
  • Previous by thread: Re: StepWise/CodeFab ScreenSaver Contest Update
  • Next by thread: Crossposting in Omni and Apple mailing list (was: Re: Tool tips in NSTableView)
  • Index(es):
    • Date
    • Thread