• 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: NSOutlineView bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView bug?


  • Subject: Re: NSOutlineView bug?
  • From: Philip Dow <email@hidden>
  • Date: Wed, 3 Aug 2005 23:24:00 +0200

John, you must apply an NSParagraph style as one of the attributes to the string.

Create an NSMutableParagraphStyle with:
[NSMutableParagraphStyle defaultParagraphStyle]

then add the line break mode with
- (void)setLineBreakMode:(NSLineBreakMode)mode

mode can be one of the following:
NSLineBreakByWordWrapping
NSLineBreakByCharWrapping
NSLineBreakByClipping
NSLineBreakByTruncatingHead
NSLineBreakByTruncatingTail
NSLineBreakByTruncatingMiddle

Finally add this paragraph style to your attributed string like you would any attribute.

See NSParagraphStyle documentation for more info.

-Phil
http://phildow.net

Am 03.08.2005 um 23:08 schrieb John Stiles:

I noticed an issue with my NSOutlineView and I was wondering if this constitutes a bug in AppKit.

One of my table columns contains an NSAttributedString; this string contains an image, and then some text which has one attribute applied to it (its baseline is raised by a few pixels to help center it against the image).

When I shrink down this table column, the text does not truncate as I would expect--i.e. with a name like "This Is A Very Long String", it would get an ellipsis at the end like "This Is A Very Lo...". Instead, individual words just vanish, so I'm left with "This Is A Very" and no ellipsis. To make matters worse, most entries in the list are really just long words without spaces in them, and in those cases they just vanish abruptly, and I'm left with just the icon.

Is this worthy of a bug report? _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSOutlineView bug?
      • From: John Stiles <email@hidden>
References: 
 >NSOutlineView bug? (From: John Stiles <email@hidden>)

  • Prev by Date: NSOutlineView bug?
  • Next by Date: Re: SVN revision number in CFBundleVersion
  • Previous by thread: NSOutlineView bug?
  • Next by thread: Re: NSOutlineView bug?
  • Index(es):
    • Date
    • Thread