Formatting an NSString
Formatting an NSString
- Subject: Formatting an NSString
- From: Patrick Lyonnais <email@hidden>
- Date: Sat, 1 Sep 2001 12:12:07 -0400
Hi Group !
I am writing a Cocoa application that outputs matrices of values in
different NSTextView's. In an NSTextView, I transforms numbers to
strings, adding those strings to the NSTextView's string; using the
string is then straightforward because the user can simply copy all the
text then paste it into something else. But I need to get "aligned
columns" with the output; using a tab when formatting the output string
is not sufficient because the right margin of the NSTextView always
wraps to next line and I want to have one full row of output before
going to next line.
How can I bypass the behavior of the NSTextView in order to get one row
of output in the string with proper tabs? When replacing the tab with
spaces, it works perfectly well (I also get the horizontal scrollbar in
the view)... except that I lost the columns alignment when looking at a
full output with multiple rows.
Any help will be appreciated.
Patrick Lyonnais