Re: Wrapping of text around an image or shape.
Re: Wrapping of text around an image or shape.
- Subject: Re: Wrapping of text around an image or shape.
- From: Graham Cox <email@hidden>
- Date: Thu, 6 Nov 2008 00:47:55 +1100
On 6 Nov 2008, at 12:39 am, Sandeep Nair wrote:
Hi All,
I am trying to do text wrapping like pages app does.
i added a View as subview of NSTextView.
i want the text inside the TextView to wrap around
the subview rect (as like in the pages app).
[]
anyone suggest me the right method to do this..
You need to write a custom NSTextContainer class.
My DrawKit code contains one for laying out text inside a path -
avoiding areas would be a case of forming a path that excludes those
parts and laying out the text within. You can d/l DrawKit here:
http://apptree.net/drawkitmain.htm
Note that just adding subviews to NSTextView doesn't work, but you can
add your custom NSTextContainer to the text system that underpins a
NSTextView. Be prepared for a fair bit of work though.
hth, Graham
_______________________________________________
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