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
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
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.