1

I have an NSTextField. I want it to draw text and have a background color. But when I set drawsBackground to YES, the text seems to draw partially transparently. For example, if I set the text color to white and background to black, the text comes out gray. Why is this?

Tom Hamming
  • 10,577
  • 11
  • 71
  • 145
  • This may be useful for you http://stackoverflow.com/questions/11120654/nstextfield-transparent-background – Sheen Vempeny Feb 03 '15 at 08:36
  • In my project I set text color [textView setTextColor:[NSColor redColor]]; and set bg color [textView setBackgroundColor:[NSColor clearColor]]; Text is not transparent. – Oksana Apr 14 '15 at 09:12

1 Answers1

0

Make sure isEnabled set to true.

I was seeing this as well and changing this fixed it for me.

Sam Soffes
  • 14,831
  • 9
  • 76
  • 80