• 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
Formatting an NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Formatting an NSString
      • From: "Erik M. Buck" <email@hidden>
  • Prev by Date: Sorry (was: Re: Bug in pathContentOfSymbolicLinkAtPath?)
  • Next by Date: Dragging flipped image
  • Previous by thread: Re: Bug in pathContentOfSymbolicLinkAtPath?
  • Next by thread: Re: Formatting an NSString
  • Index(es):
    • Date
    • Thread