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.       
d...@appsandmore.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to