• 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: NSTextField setTextColor: not working as expected
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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

  • Prev by Date: Re:NSTextField setTextColor: not working as expected
  • Next by Date: Re: NSTextField setTextColor: not working as expected
  • Previous by thread: NSTextField setTextColor: not working as expected
  • Next by thread: Re:NSTextField setTextColor: not working as expected
  • Index(es):
    • Date
    • Thread