• 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: NSAttributedString with columns
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSAttributedString with columns (From: Alexander Cohen <email@hidden>)
 >Re: NSAttributedString with columns (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSAttributedString with columns
  • Next by Date: Re: Notification when network volume disappears
  • Previous by thread: Re: NSAttributedString with columns
  • Next by thread: How can I get the domain name for a user logged into a Mac via Active Directory?
  • Index(es):
    • Date
    • Thread