Re: dynamically sized text container
Re: dynamically sized text container
- Subject: Re: dynamically sized text container
- From: Douglas Davidson <email@hidden>
- Date: Tue, 12 Jun 2007 10:05:42 -0700
On Jun 12, 2007, at 9:56 AM, LAURENS Jérôme wrote:
This question concerns the cocoa text system.
Actually, the text system fills text containers according to their
size.
How can I inform the text system that a text container is full when
its last word is for example "STOP".
The easiest thing would be to introduce a page break
(NSFormFeedCharacter, 0xc) after the last line you want in the
container.
If you need to do this completely dynamically, then it would probably
be done at the NSTypesetter level. For example, you could use a
custom typesetter subclass, override -
actionForControlCharacterAtIndex:, and return
NSTypesetterContainerBreakAction after the last line you want in the
container. Alternatively you could work with one of the line
fragment rect methods.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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