Re: contracting strings with "..."
Re: contracting strings with "..."
- Subject: Re: contracting strings with "..."
- From: Douglas Davidson <email@hidden>
- Date: Mon, 1 Dec 2003 11:52:17 -0800
On Nov 30, 2003, at 7:52 PM, Francisco Tolmasky wrote:
Does anyone know of a subclass of nsstring that when drawn into an
area that is smaller than its length it does the "..." thing. For
example "abcdefghi" would become "abcd..." or maybe "ab...hi". I'm
not sure what this behavior is called, but I've seen it done before
and I seem to recall someone advertising it before.
This is often referred to as "truncation", and it is controlled by the
line break mode of the paragraph style, e.g.
NSLineBreakByTruncatingTail. The truncating modes are supported in
Panther--see the release notes for details. You can probably find
sample code fairly readily to reproduce this effect pre-Panther, but it
is likely to be somewhat less efficient.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.