• 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: Finder like wrapping + truncation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder like wrapping + truncation


  • Subject: Re: Finder like wrapping + truncation
  • From: Mudi Dandan <email@hidden>
  • Date: Sat, 1 Nov 2008 03:53:18 +0100

I just found this in the release notes:

"The Cocoa Text System now allows the last visible line to have an ellipsis character appended if the entire content cannot fit into the specified bounding box. The behavior can be controlled with - truncatesLastVisibleLine for text cells. The -lineBreakMode must be either NSLineBreakByWordWrapping or NSLineBreakByCharWrapping for this option to take effect.. Also, the NSStringDrawingTruncatesLastVisibleLine flag can be specified to NSStringDrawing APIs that take NSStringDrawingOptions. The NSStringDrawingUsesLineFragmentOrigin flag must also be specified for the truncation flag to take effect."

On Nov 1, 2008, at 3:41 AM, Mudi Dandan wrote:

Sure I did.
Seems that NSLineBreakByTruncatingMiddle in the NSParagraphStyle overrides NSStringDrawingTruncatesLastVisibleLine.
Anyway, I think I can live with that :)


On Nov 1, 2008, at 3:32 AM, Adam R. Maxwell wrote:


On Oct 31, 2008, at 7:20 PM, Mudi Dandan wrote:

Thanks Adam, works grate!
There is only one little flaw that it always truncates the tail and I don't see a way to change this.

Did you try setting NSLineBreakByTruncatingMiddle on your NSParagraphStyle? I don't recall trying that with NSStringDrawingTruncatesLastVisibleLine myself, but it should work.


--
Adam


_______________________________________________

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

_______________________________________________

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


  • Follow-Ups:
    • Re: Finder like wrapping + truncation
      • From: "Adam R. Maxwell" <email@hidden>
References: 
 >Finder like wrapping + truncation (From: Mudi Dandan <email@hidden>)
 >Re: Finder like wrapping + truncation (From: "Adam R. Maxwell" <email@hidden>)
 >Re: Finder like wrapping + truncation (From: Mudi Dandan <email@hidden>)
 >Re: Finder like wrapping + truncation (From: "Adam R. Maxwell" <email@hidden>)
 >Re: Finder like wrapping + truncation (From: Mudi Dandan <email@hidden>)

  • Prev by Date: Re: Finder like wrapping + truncation
  • Next by Date: Re: Finder like wrapping + truncation
  • Previous by thread: Re: Finder like wrapping + truncation
  • Next by thread: Re: Finder like wrapping + truncation
  • Index(es):
    • Date
    • Thread