Check out this nice example: http://developer.apple.com/documentation/Cocoa/Conceptual/Rulers/Tasks/TruncatingStrings.html
NSLineBreakByTruncatingMiddle /* Truncate middle of line: "ab...yz" ??? Doesn't work yet */
For a work-around, see BetterTruncatingStringsInTableView.
Thanks! This works awesome!
Here is a sample project showing NSLineBreakByTruncating. This example is based on the Apple code at the address above.
I added the option to truncate by using NSLineBreakByTruncatingHead, NSLineBreakByTruncatingMiddle, or NSLineBreakByTruncatingTail.