Re: NSBrowser and NSLineBreakByTruncatingMiddle
Re: NSBrowser and NSLineBreakByTruncatingMiddle
- Subject: Re: NSBrowser and NSLineBreakByTruncatingMiddle
- From: glenn andreas <email@hidden>
- Date: Fri, 26 Jan 2007 11:27:51 -0600
On Jan 23, 2007, at 2:27 PM, Louis Sinclair wrote:
We've got an NSBrowser in an app that we're trying to get to behave
like Finder. Most of it is working, except for the text is
breaking at word boundaries. We want it to break in the middle.
We subclassed NSBrowserCell, and explicitly set the line break mode
before assigning the cell to our columns. I also put the call to
setLineBreakMode in the NSBrowserCell subclass's initTextCell method.
I've seen references to a bug with this in earlier versions of the
OS, but that is was fixed with Panther.
Is there a special trick to getting a Finder like browser?
Can you just use NSAttributedStrings and set its paragraph style
attribute to be one with its line break mode set to
NSLineBreakByTruncatingMiddle?
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures,
fractals, art
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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