• 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
NSFont question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFont question


  • Subject: NSFont question
  • From: rfitz <email@hidden>
  • Date: Tue, 3 May 2005 12:36:05 -0400

I am reading from a preference file the following attributes:
tR: red color
tG: green color        ----give me the RGB color for string
tB: blue color

tFont: name of font i want to use (Tahoma could be a value)
tSize: size I want my font to be   (24 could be a value)

With the code below I am able to make my string the the color I want,
but I have not been able to get it to the font or size that I want.

What do I need to change in the code below so I can get this to work
how I want it?


NSColor *tcol = [NSColor colorWithCalibratedRed:tR green:tG blue:tB alpha:1.0];
stringAttributes =
     [[NSDictionary dictionaryWithObjectsAndKeys:
         [NSFont systemFontOfSize:36.0], NSFontAttributeName,
          tcol, NSForegroundColorAttributeName,
          nil] retain];

Thanks in advance for the help.

-Rhon
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSFont question
      • From: Jeff Gilbert <email@hidden>
    • NSFont question
      • From: rfitz <email@hidden>
  • Prev by Date: Re: Tiger documentation update
  • Next by Date: NSFont question
  • Previous by thread: Re: OutlineEdit example (_NSArrayControllerTreeNode)
  • Next by thread: NSFont question
  • Index(es):
    • Date
    • Thread