Re: NSTextField setTextColor: not working as expected
Re: NSTextField setTextColor: not working as expected
- Subject: Re: NSTextField setTextColor: not working as expected
- From: Ricky Sharp <email@hidden>
- Date: Mon, 31 Dec 2007 08:21:02 -0600
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@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden