Re: NSTextTab at the rightmost edge of view
Re: NSTextTab at the rightmost edge of view
- Subject: Re: NSTextTab at the rightmost edge of view
- From: Douglas Davidson <email@hidden>
- Date: Fri, 15 Feb 2008 17:27:25 -0800
On Feb 15, 2008, at 4:22 PM, Daniel Jalkut wrote:
I'm trying to programatically set a right-aligned text tab at the
rightmost edge of my text view.
I've tried to set the tab stop location in terms of the width of the
text view, and in terms of the width of the text container, but
setting such a tab stop at this extreme offset seems to have the
effect of causing the tabbed text to disappear.
It was a guess to assume that the units were in pixels/points, but
it seems right. I know it's *close* to the right units, because when
I subtract 10.0 from the width, regardless of what it is, I get
roughly the desired behavior (text right-aligned to the edge of the
view).
How can I find out the maximum tab location for a given textview/
container, that will actually work as expected? The "minus 10.0"
trick works for now, but I'm a little wary.
Daniel,
It can be a little tricky figuring out where all the various bits of
space go, but there's a pretty good diagram at <http://developer.apple.com/documentation/Cocoa/Conceptual/TextStorageLayer/Tasks/Region.html
>. Take a look at (a) the text container inset and (b) the line
fragment padding and see if either of those corresponds to what you're
seeing.
Douglas Davidson
_______________________________________________
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