Re: Controlling line tightening
Re: Controlling line tightening
- Subject: Re: Controlling line tightening
- From: John Stiles <email@hidden>
- Date: Tue, 11 Mar 2008 19:52:58 -0700
Whoops, this is easy!
[myParagraphStyle setLineBreakMode:NSLineBreakByClipping];
I guess I didn't get enough sleep last night :)
I don't think this completely addresses my question—when the text field
gets too full, it looks like it does lose its tightening—but it's good
enough for my needs. The ellipsis was the big problem.
John Stiles wrote:
I'm using line tightening in some of my dialogs and 99% of the time it
works great, but there are a few aspects of it that don't work for my
app. In particular, when line tightening kicks in, first it attempts
to shrink the text to fit the box, which is awesome. But when it still
doesn't fit even when shrunk, it disables tightening and appends an
ellipsis, and this ellipsis is problematic for me.
I'd like to change it so that when the text doesn't fit, it just
tightens it to the maximum tightness allowed and displays as much text
as possible. Or at the very least, I'd like to disable the ellipsis.
I have a text field which in some circumstances can tighten, and
that's by design. In very extreme circumstances it will still be too
much text. (Before you say "increase the tightening threshold," well,
that just makes the circumstances at which it will fail even more
extreme.) This is not a big problem, but I don't want to see the
ellipsis, since it ends up truncating even more text, meaning that
instead of only losing one or two characters at the end of my string,
I lose five or six… which suddenly turns a tiny problem into a big one.
_______________________________________________
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
_______________________________________________
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