NSTextView multiple columns

Hi


I want to display text in multiple columns in OS X using Cocoa.


NSTextView works well for one column, but which approach should I choose to handle multiple columns?


Any advice or hint is welcome...


Thanks

Accepted Answer

The general approach is outlined in the Cocoa Text Architecture Guide: Text System Organization – Common Configurations. Look for figure 3-5. You create the components of the text system separately, rather than just creating a text view and having it create the other components for you. You use a single text storage object, a single layout manager, and multiple text containers and text views. Each page-column is associated with a pair of text container and text view. You implement a delegate for the layout manager and implement -layoutManager:didCompleteLayoutForTextContainer:atEnd: to add additional columns and pages, along with their associated text containers and text views, as necessary to accommodate the text.

Hi Ken, thanks for your quick and precise response - hope my coding skills will be suffcient... 🙂

NSTextView multiple columns
 
 
Q