On Jun 14, 2010, at 7:29 AM, Kyle Sluder wrote:

> On Jun 14, 2010, at 6:46 AM, Alexander Cohen <a...@toomuchspace.com> wrote:
> 
>> Hello,
>> 
>> I would like to use an NSAttributed string in order to render a type of 
>> key/value 2 column display in a NSTextField. As of now, i'm using tabs 
>> between key's and value's on each line but some values need to wrap to the 
>> next line and i would like them to wrap to the start of value column and not 
>> wrap all the way to the beginning og the new line. Is this possible using 
>> attributes and an NSAttaributedString. Heres an example:
> 
> As Gideon said, you will need to use tables for this. They are a bit 
> unwieldy, but they will do what you want. If you want true multicolumn text 
> layout you will need to use a custom arrangement of NSTextContainers.

One relatively simple way to do this is to write your text and formatting in 
HTML, and use NSAttributedString's HTML import functionality to convert it into 
NSAttributedString's table format.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to