• 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
Setting the width of an NSTextView automatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting the width of an NSTextView automatically


  • Subject: Setting the width of an NSTextView automatically
  • From: Simson Garfinkel <email@hidden>
  • Date: Tue, 12 Mar 2002 06:11:38 -0500

I'm interested in having an NSTextView that automatically sets its width to be the width of the longest line, rather than having the lines of text wrap.

I've tried just setting the width to be 800 pixels, but that isn't quite right, because it's usually too wide (and thus looks funny in the scrollbar) and it sometimes is not wide enough.

I've also tried running -[NSText sizetoFit] after each keystroke. That's really ugly, and it doesn't work either.

Any clues? Please reply to me and the list.
_______________________________________________
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.

  • Prev by Date: Re: Loading a localized tiff file: how to?
  • Next by Date: Re: dumb override question
  • Previous by thread: Terminating app when threads are running
  • Next by thread: Re: Setting the width of an NSTextView automatically
  • Index(es):
    • Date
    • Thread