Re: disabling tooltips table view
Re: disabling tooltips table view
- Subject: Re: disabling tooltips table view
- From: "Rick C." <email@hidden>
- Date: Tue, 18 Aug 2009 05:39:52 -0700 (PDT)
thank you graham,
upon closer look i was in error to use the word tooltip. i have seen this method before and tried it again and it does work to change the tooltip or disable it. what i'm seeing must be some form of highlighting. although i have disabled the standard highlighting where when you click the rows it highlights. this is not my issue. it seems the rows that are truncated with a tail are the ones that highlight when i hover my mouse over the row. on a row that is not truncated it does not highlight. i have coded into my custom cell setLineBreakMode:NSLineBreakByTruncatingTail. Maybe the issue lies somewhere here?
edited: I just discovered this method:
- (NSRect)expansionFrameWithFrame:(NSRect)cellFrame inView:(NSView *)view
and returned NSZeroRect and seems that does the job. Assuming it does thank you for your help you did get me on the right track!
Rick
________________________________
From: Graham Cox <email@hidden>
To: Rick C. <email@hidden>
Cc: cocoa dev <email@hidden>
Sent: Tuesday, August 18, 2009 7:52:39 PM
Subject: Re: disabling tooltips table view
On 18/08/2009, at 9:24 PM, Rick C. wrote:
> hello,
>
> i'm probably overlooking something simple but if someone could point me in the right direction on how to disable tooltips in my table view i would appreciate it. i have tried all the ways i could find through documentation/google and they still seem to appear although randomly. thank you very much,
>From the docs for NStableView's delegate methods. Note the last sentence.
tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:
Returns a string that is displayed as a tooltip for aCell in aTableColumn of aTableView.
- (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:(NSCell *)aCell rect:(NSRectPointer)recttableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation
Discussion
The row is the row of the cell and aTableColumn is the NSTableColumn that contains the cell. The rect represents the proposed active area of the tooltip. By default, rect is computed as [cell drawingRectForBounds:cellFrame]. You can modify rect to provide an alternative active area. Return nil or the empty string if no tooltip is desired.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden