• 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: NSBrowser and NSLineBreakByTruncatingMiddle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSBrowser and NSLineBreakByTruncatingMiddle (From: Louis Sinclair <email@hidden>)

  • Prev by Date: Re: Mount/Unmount events in Foundation tool
  • Next by Date: Re: Mouse & keyboard inactivity
  • Previous by thread: NSBrowser and NSLineBreakByTruncatingMiddle
  • Next by thread: Strange int behavour
  • Index(es):
    • Date
    • Thread