• 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
Re: Multiple tooltips
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple tooltips


  • Subject: Re: Multiple tooltips
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 7 Sep 2001 10:02:18 -0700

On Friday, September 7, 2001, at 09:16 AM, Youngjin Kim wrote:

Have anyone ever successfully tried multiple tooltips in different part of a view?
I'm looking at addToolTipRect/removeToolTip pair. These look like what I should use. but cannot figure out what should be sent to 'userData'. Any Idea?

- (NSToolTipTag)addToolTipRect:(NSRect)aRect owner:(id)anObject userData:(void *)data;
- (void)removeToolTip:(NSToolTipTag)tag;

If you use these methods, then the owner will usually implement the following method:

@interface NSObject(NSToolTipOwner)
- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data;
@end

where the userData is an arbitrary pointer of your choice, that may help you to identify the tool tip--use NULL if this is not of use to you.

(If the owner does not implement view:stringForToolTip:point:userData:, then the tool tip will show the owner's description.)

Douglas Davidson


References: 
 >Multiple tooltips (From: Youngjin Kim <email@hidden>)

  • Prev by Date: Re: Sorting columns of non-reorderable columns tableview
  • Next by Date: Re: controlling buttons
  • Previous by thread: Multiple tooltips
  • Next by thread: When Obj-C++?
  • Index(es):
    • Date
    • Thread