I've got a NSPopUpButtonCell in my NSTableView. I've tried everything I can think of but I can't get the text color to change. I've read numerous posts (on other formums) about how this is done. The most recent was setting the individual menuitem titles with -setAttributedTitle. I've put in debug code to verify that title being used is my attributed string - which was created using the following attributes:
attrs = [NSMutableDictionary dictionaryWithCapacity:3];
[attrs setValue:[NSColor redColor] forKey"NSForegroundColorAttributeName"];
[attrs setValue:[NSColor redColor] forKey"NSStrokeColorAttributeName"];
[attrs setValue:[NSNumber numberWithFloat:8.0] forKey"NSStrokeWidthAttributeName"];
I've also checked the attributes of the string each place where it should be used to verify that the color is the color it is supposed to be.
the only clue is that I can tell that it is using the string because the appearance changes in the popup menu. The line spacing is tighter together than if I just use the normal title with an NSString. It's as if it can't understand the attributes because as you can see I put in an 8 for the strokewidth ( a huge number) just to see if anything changed - nothing changed.
Does anyone have a solution. I can't imagine that this is one of those things that can't be done. I'm sure I am missing something somewhere.
Any help would be greatly appreciated. Thanks.
attrs = [NSMutableDictionary dictionaryWithCapacity:3];
[attrs setValue:[NSColor redColor] forKey"NSForegroundColorAttributeName"];
[attrs setValue:[NSColor redColor] forKey"NSStrokeColorAttributeName"];
[attrs setValue:[NSNumber numberWithFloat:8.0] forKey"NSStrokeWidthAttributeName"];
I've also checked the attributes of the string each place where it should be used to verify that the color is the color it is supposed to be.
the only clue is that I can tell that it is using the string because the appearance changes in the popup menu. The line spacing is tighter together than if I just use the normal title with an NSString. It's as if it can't understand the attributes because as you can see I put in an 8 for the strokewidth ( a huge number) just to see if anything changed - nothing changed.
Does anyone have a solution. I can't imagine that this is one of those things that can't be done. I'm sure I am missing something somewhere.
Any help would be greatly appreciated. Thanks.