Combining NSLineBreakByWordWrapping + NSLineBreakByTruncatingTail in NSTextView

2008-02-28 Thread Mattias Arrelid
Hi there. Occasionally I need to display some very long strings. These string can have sentences that would span several lines depending on the width of my NSTextView. Example of such texts: This is the first line which spans over to the second line and then it stops. This is another

Re: Combining NSLineBreakByWordWrapping + NSLineBreakByTruncatingTail in NSTextView

2008-02-28 Thread John Stiles
I don't know the answer, but if you figure it out, please post a followup on Cocoa-Dev. I could use this also :) Mattias Arrelid wrote: Hi there. Occasionally I need to display some very long strings. These string can have sentences that would span several lines depending on the width of my

Re: Combining NSLineBreakByWordWrapping + NSLineBreakByTruncatingTail in NSTextView

2008-02-28 Thread Aki Inoue
Starting from Leopard, you can do -[NSCell setTruncatesLastVisibleLine:] or pass NSStringDrawingTruncatesLastVisibleLine to -[NSString drawWithRect:options:attributes:]. We don't have out-of-box support for NSTextView. If you feel there should be support in NSTextView, please file a bug.