Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

string attributes and lineheight



Hi,

I would like to use a background color to annotate some text, using the following code:


attributes = [NSDictionary dictionaryWithObject: backGroundColor forKey: NSBackgroundColorAttributeName];
[layoutManager addTemporaryAttributes: attributes forCharacterRange: aRange];


This works fine, only that the color in two adjacent lines touch. I rather would like to have some white space between the lines. So I tried this:

attributes = [NSDictionary dictionaryWithObjectsAndKeys: backGroundColor, NSBackgroundColorAttributeName,
[NSNumber numberWithFloat: 1], NSBaselineOffsetAttributeName, nil];

But that didn't give the expected result. Is there I way I can adjust the lineheight for the backgroundcolor attribute?


thanks,

- Koen.
_______________________________________________
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.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.