Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField setTextColor: not working as expected



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSTextField setTextColor: not working as expected (From: "charlie" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.