Re: NSTextView without NSScrollView
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