Re: NSTextFiledCell in NSTableView doesn't truncate text if it contains a NSAttributedString
Re: NSTextFiledCell in NSTableView doesn't truncate text if it contains a NSAttributedString
- Subject: Re: NSTextFiledCell in NSTableView doesn't truncate text if it contains a NSAttributedString
- From: Brian Ganninger <email@hidden>
- Date: Thu, 23 Aug 2007 06:47:35 -0700
I don't remember the exact name offhand but the truncation behavior
is an attribute you need to set explicitly if you are returning
attributed strings instead of generic strings.
Actually, I take that back, I had some code here that has it so see
below:
NSMutableParagraphStyle *style = [[[NSParagraphStyle
defaultParagraphStyle] mutableCopy] autorelease];
[style setLineBreakMode:NSLineBreakByTruncatingTail];
- brian
On Aug 23, 2007, at 2:17 AM, Marco Damaschi wrote:
I have a NSTableView with columns containing cells of type
NSTextFieldCell. The NSTextFieldCell is configured so that its size is
small and its line breaking mode is truncate tail.
Some cells of my table contain bold text, so that the table view's
data
source returns a NSAttributedString for their content. The problem
rises
up if the text needs to be truncated: it is not truncated using the
truncate tail mode (as requested) but using the world wrap mode.
The cells
containing NSStrings work correctly.
Someone has experienced the same problem? Any ideas?
Thanks in advance
Marco Damaschi
_______________________________________________
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:
40mac.com
This email sent to 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