• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Wrapping of text around an image or shape.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Wrapping of text around an image or shape.
      • From: "Sandeep Nair" <email@hidden>
References: 
 >Wrapping of text around an image or shape. (From: "Sandeep Nair" <email@hidden>)

  • Prev by Date: Re: Wrapping of text around an image or shape.
  • Next by Date: Re: Underlining text in Interface Builder
  • Previous by thread: Re: Wrapping of text around an image or shape.
  • Next by thread: Re: Wrapping of text around an image or shape.
  • Index(es):
    • Date
    • Thread