Re: NSTextView text too narrow
Re: NSTextView text too narrow
- Subject: Re: NSTextView text too narrow
- From: Ben Kazez <email@hidden>
- Date: Tue, 21 Mar 2006 10:33:16 -0500
On Mar 21, 2006, at 10:24 AM, Ondra Cada wrote:
Ben,
On 21.3.2006, at 16:15, Ben Kazez wrote:
I've created an NSTextView subclass to work like the comments
field in iPhoto or the notes field in iCal. It's working well,
except that there's a small margin on the right side that
shouldn't be there. I tried [[self textContainer]
setContainerSize:someWiderSize] but this didn't seem to have an
effect. How do I make the text go closer to the right edge?
Am definitely *not* sure it is the real culprit, but have you
checked the line fragment padding in the text container?
I set it to zero, which allowed me to adjust the text container inset
without having to resort to a negative size:
[self setTextContainerInset:NSMakeSize(2.0, 0.0)];
[[self textContainer] setLineFragmentPadding:0.0];
This gives the proper 2-px margin on the left. But I'm discovering,
rather than reading about, a lot of these things. Is this the wrong
way to do it?
Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden