• 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
Re: NSTextView Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView Question


  • Subject: Re: NSTextView Question
  • From: Ken Thomases <email@hidden>
  • Date: Tue, 08 Sep 2015 10:17:29 -0500

On Sep 8, 2015, at 9:22 AM, Dave <email@hidden> wrote:

> I’ve got an NSTextView that’s working in that it Scrolls ok vertically, but If I have a long line, it wraps instead of clipping the line and allowing Horizontal Scrolling. I’ve looked at the properties of the ScrollView and the underlying TextView but I can see no option to have it truncate lines, whereas AFAIR, this option is present in a NSTextField. I’ve got Show H Scroller, Show V Scroller and Automatically Hide Scroller all set to ON.

On the Size inspector for the text view, check Resizable: Horizontally.  Also, set the maximum width to a very big number.

I expect that this also sets the text view's text container to not track its view's width.  If it doesn't, then you may have to do that in code:

theTextView.textContainer.containerSize = NSMakeSize(FLT_MAX, FLT_MAX);
theTextView.textContainer.widthTracksTextView = NO;

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTextView Question
      • From: Dave <email@hidden>
References: 
 >NSTextView Question (From: Dave <email@hidden>)

  • Prev by Date: Re: Auto Layout, NSScrollView and NSStackView - Adding View to StackView
  • Next by Date: Re: NSTextView Question
  • Previous by thread: Re: NSTextView Question
  • Next by thread: Re: NSTextView Question
  • Index(es):
    • Date
    • Thread