the following works for me ...
NSMutableParagraphStyle *ps;
ps = [[NSMutableParagraphStyle alloc] init];
[ps setAlignment:NSLeftTextAlignment];
_leftAlign = [[NSDictionary alloc] initWithObjectsAndKeys: [NSFont
systemFontOfSize:12.0], NSFontAttributeName, ps,
NSParagraphStyleAttributeName, [NSColor blueColor],
NSForegroundColorAttributeName, nil];
[_value drawInRect:cellFrame withAttributes:_leftAlign];
On Mar 4, 2009, at 12:13 PM, Robert Bielik wrote:
Hi all,
I have a NSTextField in which I'd like to change the selected text
color. From various sources I've got this:
NSTextView* tv = (NSTextView*)[[m_nstextfield window]
fieldEditor:YES forObject:m_nstextfield];
[tv setSelectedTextAttributes:[NSDictionary dictionaryWithObject:
[NSColor blackColor] forKey:NSForegroundColorAttributeName]];
but noo... I can't get anything but the default color, i.e. same as
the normal text color.
Ideas?
TIA
/Rob
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/airedale%
40tularosa.net
This email sent to [email protected]
David Blanton
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]