Re: Problems with NSTextField and attributed strings
Re: Problems with NSTextField and attributed strings
- Subject: Re: Problems with NSTextField and attributed strings
- From: Glenn Andreas <email@hidden>
- Date: Wed, 21 Jul 2004 15:24:57 -0500
At 2:56 PM -0500 7/21/04, Tim Cartwright wrote:
On 21 Jul 2004, at 13:50, Glenn Andreas wrote:
At 1:16 PM -0500 7/21/04, Tim Cartwright wrote:
Other attributes embedded in the text field value are displaying,
but no matter what I set for the paragraph spacing before, I don't
see a change in line spacing. Does "\n" not separate paragraphs?
What am I doing wrong?
Not sure on this, but I believe that "space before" isn't used for
the for the first paragraph (since it's at the "top", just like
"space after" on the last paragraph is ignored because there's
nothing after it).
I agree with Glenn's interpretation of paragraph spacing. So, it's
worth re-iterating that I'm dealing with multiple lines. For
example:
Line 1 (normal)
Line 2 (paragraph space before = 20.0)
Line 3 (paragraph space before = 20.0)
I would expect to see an extra 20 point vertical space between Line
1 and Line 2, and between Line 2 and Line 3.
Again, I'm concerned about the definition of a "paragraph" in Cocoa.
I separate my lines using "\n", which I guess would be the paragraph
separator, but I really don't know. I can't find anything in the
Cocoa documentation that explains over what textual domain a
paragraph style is supposed to apply.
"\n" (as well as "\r" and a unicode "paragraph separator" or two)
will separate paragraphs.
If you just want an extra 20 points between the paragraphs, try
"setParagraphSpacing:" (since that works all the way back to 10.0,
while setParagraphSpacingBefore: requires 10.3)
--
Glenn Andreas email@hidden
mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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.