Re: Text Layout problems
Re: Text Layout problems
- Subject: Re: Text Layout problems
- From: Douglas Davidson <email@hidden>
- Date: Mon, 6 Mar 2006 09:51:41 -0800
On Mar 5, 2006, at 11:37 AM, Ben Lachman wrote:
So I set up the text view to be vertically resized by the layout
manager via setVerticallyResizable:YES and set the text container
to resize horizontally with setWidthTracksTextView:YES per the
documentation. However when I size the window down to where the
text view must resize, the blank space at left at the top of my
text container gets ignored and the text which was drawn 10 units
from the top of the view is mashed up against it.
I think this might be a "feature" of the layout manager since
calling the usedRectForTextContainer: returns a rectangle that
doesn't include the top portion of the text container (I'm not
saying this is necessarily wrong behavior since that portion of the
container is empty, its just not what I want it to do) and the
layout manager is what resizes the text view (according to the
docs). So my basic question is, how do I stop this from
happening? Is there a function in the layout manager that I can
override? In looking through the class docs I can't figure out
what it would be.
Remember that the layout manager always works in container
coordinates, which are offset from the text view's coordinates by the
textContainerOrigin. The text view controls this origin, which is
based on the textContainerInset, but which may be modified, for
example if there is not enough space in the view for both the inset
and the text. This may be what you are seeing; take a look at these
values and find out.
Douglas Davidson
_______________________________________________
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