• 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: String color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String color


  • Subject: Re: String color
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 19 Sep 2001 23:33:48 +0200

John,

>>>>>> John Hornkvist (JH) wrote at Wed, 19 Sep 2001 22:42:43 +0200:
JH> NSStrings don't have color; use NSAttributedString if you want to set
JH> properties like color, font etc.
JH>
JH> For simple drawing, the string should accept the graphics contex:
JH> [[NSColor redColor] set];
JH> [string drawAtPoint:NSMakePoint(10,10)];

Or explicit attributes, like

[string drawAtPoint:pt withAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
font,NSFontAttributeName,
color,NSForegroundColorAttributeName,
nil]];

whatever you found more convenient.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


References: 
 >Re: String color (From: John Hörnkvist <email@hidden>)

  • Prev by Date: Re: Aqua Interface Guidelines & Close Window location
  • Next by Date: Re: Aqua Interface Guidelines & Close Window location
  • Previous by thread: Re: String color
  • Next by thread: Re: String color
  • Index(es):
    • Date
    • Thread