FROM : Ricky Sharp
DATE : Mon Dec 31 15:21:02 2007
On Dec 30, 2007, at 11:50 PM, charlie wrote:
> this works:
>
> [myTextField setTextColor:[NSColor redColor]];
>
> this doesn't work:
>
> [myTextField setTextColor:[[NSColor redColor]
> colorWithAlphaComponent:0.5]];
> (result is plain red, ignoring alpha)
>
> this doesn't work:
>
> [myTextField setTextColor:[NSColor colorWithCalibratedRed:0.123
> green:0.456 blue:0.789 alpha:1.0]];
> (result is black, regardless of what the individual components are
> set to)
All these work for me (10.5.1)
> what am i missing here?
You're going to have to post more info (e.g. what OS you're using).
Also, what type is myTextField? Custom subclass? What container
object(s) is the text field placed into?
___________________________________________________________
Ricky A. Sharp mailto:<email_removed>
Instant Interactive(tm) http://www.instantinteractive.com
DATE : Mon Dec 31 15:21:02 2007
On Dec 30, 2007, at 11:50 PM, charlie wrote:
> this works:
>
> [myTextField setTextColor:[NSColor redColor]];
>
> this doesn't work:
>
> [myTextField setTextColor:[[NSColor redColor]
> colorWithAlphaComponent:0.5]];
> (result is plain red, ignoring alpha)
>
> this doesn't work:
>
> [myTextField setTextColor:[NSColor colorWithCalibratedRed:0.123
> green:0.456 blue:0.789 alpha:1.0]];
> (result is black, regardless of what the individual components are
> set to)
All these work for me (10.5.1)
> what am i missing here?
You're going to have to post more info (e.g. what OS you're using).
Also, what type is myTextField? Custom subclass? What container
object(s) is the text field placed into?
___________________________________________________________
Ricky A. Sharp mailto:<email_removed>
Instant Interactive(tm) http://www.instantinteractive.com
| Related mails | Author | Date |
|---|---|---|
| charlie | Dec 31, 06:50 | |
| Shripada Hebbar | Dec 31, 14:55 | |
| Ricky Sharp | Dec 31, 15:18 | |
| charlie | Dec 31, 15:20 | |
| Ricky Sharp | Dec 31, 15:21 | |
| charlie | Dec 31, 15:23 |






Cocoa mail archive

