Skip navigation.
 
mlRe:NSTextField setTextColor: not working as expected
FROM : Shripada Hebbar
DATE : Mon Dec 31 14:55:07 2007

>
> this doesn't work:
>
> [myTextField setTextColor:[[NSColor redColor] 
> colorWithAlphaComponent:0.5]];
> (result is plain red, ignoring alpha)
>

Documentation  of 'colorWithAlphaComponent' says:
"A subclass with explicit opacity components should override this 
method to return a color with the specified alpha."
Thus the above code wont return you the expected color.


Regards
Shripada

Related mailsAuthorDate
mlNSTextField setTextColor: not working as expected charlie Dec 31, 06:50
mlRe:NSTextField setTextColor: not working as expected Shripada Hebbar Dec 31, 14:55
mlRe: NSTextField setTextColor: not working as expected Ricky Sharp Dec 31, 15:18
mlRe:NSTextField setTextColor: not working as expected charlie Dec 31, 15:20
mlRe: NSTextField setTextColor: not working as expected Ricky Sharp Dec 31, 15:21
mlRe: NSTextField setTextColor: not working as expected charlie Dec 31, 15:23