• 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
Table View and Tool Tips
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Table View and Tool Tips


  • Subject: Table View and Tool Tips
  • From: Andreas Mayer <email@hidden>
  • Date: Thu, 17 Oct 2002 14:50:18 +0200

Hello.

Did anyone manage to display tool tips for the cells of a table view?

I tried two different approaches, that both failed:

1. Setting the whole table view as tool tip rect using addToolTipRect:owner:userData: and determining the cell in view:stringForToolTip:point:userData:.
That way I'm able to show the correct tool tip. But it won't disappear until I move the mouse outside the table view.

2. Tracking mouse movement with mouseMoved: and setting a new tool tip rect for the cell under the mouse using addToolTipRect:owner:userData: every time.
view:stringForToolTip:point:userData: does not get called. I suppose this is because the mouse is already inside the rectangle when I register it. (Besides, I get an error when trying to removeAllToolTips and none are defined. But there seems to be no way to find out beforehand.)

I can imagine a third approach:

3. Setting up tool tips rects for each single cell in the table view and recreating all of them when the table view or one table column changes size.
That seems a lot of overhead and will probably not be feasible for large lists.

I could manage the tooltips myself with mouseMoved: and timers - if there was a way to manually show and hide a tool tip. But I didn't find a way to do it. A NSToolTip class would help. Looks like there's not even a toolTipColor method.

If I was able to get this working I would be happy to make the solution open source ...


bye. Andreas.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Table View and Tool Tips
      • From: Ryan Stevens <email@hidden>
  • Prev by Date: Re: Cocoa and PortAudio
  • Next by Date: Re: A CFStringRef that throws EXC_BAD_ACCESS
  • Previous by thread: Re:NSSplitView query
  • Next by thread: Re: Table View and Tool Tips
  • Index(es):
    • Date
    • Thread