• 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:20:47 +0100

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.


On Nov 1, 2008, at 2:50 AM, Adam R. Maxwell wrote:


On Oct 31, 2008, at 6:39 PM, Mudi Dandan wrote:

Hi,

I'm needing a hand with this. I'm trying to emulate the wrapping and truncation for icon labels in Finder's icon view.

My first question is: is there any method around for making a string to line wrap, and to truncate the second line if it is too long (like on the right hand image in the screenshot). Is this supported in an API?

It's supported as of 10.5. See NSStringDrawingTruncatesLastVisibleLine in NSStringDrawing.h, along with appropriate NSParagraphStyle options.


The second questions is: can the NSAttributedString render the background for the text like the ones on the screenshots or is it something I have to draw myself?

I think you'll have to draw that yourself.

--
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


  • 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>)

  • 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