Re: NSAttributedString with columns
Re: NSAttributedString with columns
- Subject: Re: NSAttributedString with columns
- From: Douglas Davidson <email@hidden>
- Date: Mon, 14 Jun 2010 07:57:37 -0700
On Jun 14, 2010, at 7:29 AM, Kyle Sluder wrote:
> On Jun 14, 2010, at 6:46 AM, Alexander Cohen <email@hidden> 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 (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