• 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
string attributes and lineheight
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

string attributes and lineheight


  • Subject: string attributes and lineheight
  • From: Koen van der Drift <email@hidden>
  • Date: Sat, 26 Jun 2004 10:23:09 -0400

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.


  • Follow-Ups:
    • Re: string attributes and lineheight
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Address Book madness
  • Next by Date: my app crashes MallocDebug
  • Previous by thread: Re: Address Book madness
  • Next by thread: Re: string attributes and lineheight
  • Index(es):
    • Date
    • Thread