• 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
Controlling soft page breaks in multiple text views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Controlling soft page breaks in multiple text views


  • Subject: Controlling soft page breaks in multiple text views
  • From: Aram Greenman <email@hidden>
  • Date: Sat, 28 Feb 2004 10:55:20 -0800

I have a multiple page view where several text views share the same layout manager. I need to control where "page breaks" occur under certain circumstances, for example, I don't want certain paragraphs split over two text views. I know you can insert a form feed character to create a hard page break, but that's not what I'm looking for, I want a soft page break based on layout information.

I think I need to subclass NSLayoutManager but I can't figure out what methods to override. By default, NSLayoutManager checks to see if the current text container has enough room for a line of text, if it does, put it there, otherwise, it moves on to the next text container. What I want to do is only use the current text container if there is enough room for an entire paragraph, instead of a line.

There are other times I would want to intervene in the layouting as well, but if I can figure out this one, I think those should be easy. Any help is greatly appreciated.

Thanks,
Aram
_______________________________________________
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.


  • Prev by Date: Comparing dates
  • Next by Date: Re: Cocoa XML-RPC Framework
  • Previous by thread: Re: Comparing dates
  • Next by thread: Populating NSTableView from data source
  • Index(es):
    • Date
    • Thread