Re: Testing NSLineBreakByTruncatingTail
Re: Testing NSLineBreakByTruncatingTail
- Subject: Re: Testing NSLineBreakByTruncatingTail
- From: cricket <email@hidden>
- Date: Mon, 5 Jan 2004 17:14:56 -0800
On Jan 5, 2004, at 11:26 AM, Jim Correia wrote:
Doesn't look like anyone responded to this. The somewhat non-obvious
answer to this is to set the wrapping behavior of the underlying
cells in the tableview. Looking at your test project, I added the
following to the top of your awakeFromNib method and the truncation
worked as expected.
NSEnumerator *columns = [[myTableView tableColumns]
objectEnumerator];
id column;
while (column = [columns nextObject]) {
[[column dataCell] setWraps:YES];
}
Is this documented anywhere? (I didn't see it in the release notes or
the NSCell documentation.)
Is it possible to control which truncation method is used?
The truncation types are documented in the NSMutableParagraphStyle
documentation for setLineBreakMode:
The code snippet I posted above is an addendum to the project Paul
Fitzgerald posted to the list, which you can find at this URL:
There's a test project here: http://homepage.mac.com/pgfitzgerald
Just doing a setWraps:YES on the underlying cell is not enough to get
truncation to work, it was just the missing piece that Paul needed to
get his test project to work as expected.
I don't know if there is any documentation on the need for doing a
setWraps:YES on the underlying cell to get truncation to work.
- cricket
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.