• 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 without NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView without NSScrollView


  • Subject: Re: NSTextView without NSScrollView
  • From: James Walker <email@hidden>
  • Date: Fri, 17 Jul 2009 19:00:30 -0700

Kyle Sluder wrote:
On Fri, Jul 17, 2009 at 5:19 PM, James Walker<email@hidden> wrote:
Is there a way to have an NSTextView that is not enclosed in an
NSScrollView?  IB doesn't seem to want to let me.  It would be for
displaying static rich text (certain things are harder, or maybe even
impossible, to do with NSTextField).  I know I can turn off drawing of the
NSScrollView border, but it throws off the layout, because there's a margin
around the text, at least on the left.

How is this going to behave when autosizing?


I don't understand the question. It's static text, when is it going to autosize?


Perhaps removing the
scroll view is not such a good idea.  You can use
-setTextContainerInset: to remove the whitespace if you desire.


Well, that didn't work, but looking at the documentation for setTextContainerInset got me on the right track. Here's what did work:

[[myText textContainer] setLineFragmentPadding: 0.0f];

Thanks.
--
  James W. Walker, Innoventive Software LLC
  <http://www.frameforge3d.com/>
_______________________________________________

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 without NSScrollView
      • From: Kyle Sluder <email@hidden>
References: 
 >NSTextView without NSScrollView (From: James Walker <email@hidden>)
 >Re: NSTextView without NSScrollView (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: [Job] Cocoa developer at Skype (Mac/iPhone)
  • Next by Date: Re: Finding an available port for chat
  • Previous by thread: Re: NSTextView without NSScrollView
  • Next by thread: Re: NSTextView without NSScrollView
  • Index(es):
    • Date
    • Thread