• 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: NSTableview tooltip bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableview tooltip bug?


  • Subject: Re: NSTableview tooltip bug?
  • From: Donald Hall <email@hidden>
  • Date: Wed, 02 May 2012 21:12:42 -0600

Thanks! Got it running in a few minutes. For others, I used the NSTableViewDelegate methods

tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:

and

tableView:shouldShowCellExpansionForTableColumn:row:

to prevent the cell expansion.
------------
Don Hall
Apps & More Software Design, Inc.
email@hidden


On 2012-05-02, at 11:54 AM, email@hidden wrote:

> From: Corbin Dunn <email@hidden>
> To: Donald Hall <email@hidden>
> Cc: email@hidden
> Subject: Re: NSTableview tooltip bug?
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=us-ascii
>
> hi don,
> I recommend using the builtin tooltip support in NSTableView. There is a delegate method to provide the tool tip. Next, you are seeing expansionToolTips. Look at NSCell.h for custom drawing API for them. Or, turn them off for your table with API on NSTableView.
>
> corbin
>
> On May 1, 2012, at 5:10 PM, Donald Hall <email@hidden> wrote:
>
>> I have an NSTableview column where each cell contains a file name. I use tooltips (addToolTipRect and NSToolTipOwner protocol)  to show the complete path to the file when the user hovers the mouse over the cell. This works fine unless the name of the file exceeds the column width - 3 pixels. i.e. if the width of the text for the cell is greater than (column width - 3) I get a strange behaviour: the correct tooltip flashes briefly in the usual place relative to the cell, then the cell itself becomes highlighted with a bright yellow background. If the text width is greater than the cell width the the highlighted rectangle extends over the column boundary, so I guess it is the enclosing rectangle of the cell's text that is highlighted.
>>
>> I created a category on NSString to define a truncated string method where I remove characters from the middle of the string to fit it into a specified width. My workaround to this problem was to specify the column width - 3 as the width I wanted for the truncated string.
>>
>> Has anyone else seen this? Is it a known bug?
>>
>> Thanks, Don
>>
>> ------------
>> Don Hall
>> Apps & More Software Design, Inc.
>> email@hidden
>>
>

_______________________________________________

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

  • Prev by Date: Re: NSTableView doesn't show data until I click on a header
  • Next by Date: Re: Are there any way to update NSPanel content during dragging the panel ?
  • Previous by thread: Re: NSTableview tooltip bug?
  • Next by thread: Concealing an app from DTrace
  • Index(es):
    • Date
    • Thread