• 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
Help: Non-wrapping NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help: Non-wrapping NSTextView


  • Subject: Help: Non-wrapping NSTextView
  • From: Timothy Mowlem <email@hidden>
  • Date: Sat, 21 Dec 2002 09:55:57 +0000

Hello,

I am trying to write a simple text editor for editing, e.g. source code, to improve
my understanding of Cocoa.

Please can someone tell me if it's possible to make an NSTextView not wrap
horizontally, and if so how you do it?

The default is the wrap text horizontally if you type past the edge of the control.
This behaviour is the same if you add the NSTextView to an NSScrollView
as you might when creating a document window.

I would like the text to just go on a single line until I press Return and for the
horizontal scrollbar (present if the NSTextView is embedded in a NSScrollView)
to resize automatically.

I have checked the Cocoa docs for most of the Cocoa text system classes and
several books but not found anything. Interface Builder does not have a setting
to toggle this, and TextEdit apparently cannot do this.


Thanks in advance.

Timothy Mowlem
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Help: Non-wrapping NSTextView
      • From: Mike Ferris <email@hidden>
    • Re: Help: Non-wrapping NSTextView
      • From: Jérôme Laurens <email@hidden>
  • Prev by Date: Re: Why is this code leaking memory?
  • Next by Date: Re: Help: Non-wrapping NSTextView
  • Previous by thread: didClickTableColumn, setHighlightedTableColumn
  • Next by thread: Re: Help: Non-wrapping NSTextView
  • Index(es):
    • Date
    • Thread