OS X 10.7:
Whenever I try to setBackgroundStyle:
on an NSTex开发者_StackOverflowtField
's cell that has an Attributed String value, the background style is unmodified. If the NSTextField
has just a String value, the background style setter works.
[myTextField cell]
returns an object of type NSTextFieldCell
in both cases, which inherits setBackgroundStyle:
from NSCell
.
Anyone have a suggestion on how I can get around this limitation? I know I could try to recreate it with attributes, but I may never be able to get it just right.
P.S. - NSBackgroundStyleLowered
appears to override your cell's text color (makes mine white), whereas NSBackgroundStyleRaised
does not.
IME, the NSAttributedString overrides the settings for the NSTextField.
精彩评论