• 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: Testing NSLineBreakByTruncatingTail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Testing NSLineBreakByTruncatingTail
      • From: Jim Correia <email@hidden>
References: 
 >Re: Testing NSLineBreakByTruncatingTail (From: cricket <email@hidden>)
 >Re: Testing NSLineBreakByTruncatingTail (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: Changing the cell for a control
  • Next by Date: Re: Testing NSLineBreakByTruncatingTail
  • Previous by thread: Re: Testing NSLineBreakByTruncatingTail
  • Next by thread: Re: Testing NSLineBreakByTruncatingTail
  • Index(es):
    • Date
    • Thread