Re: NSTextField/Cell + selection color?
Re: NSTextField/Cell + selection color?
- Subject: Re: NSTextField/Cell + selection color?
- From: "Alan Smith" <email@hidden>
- Date: Sun, 29 Apr 2007 16:03:17 -0400
Hi Brian,
Below is a message I sent to someone who had asked the same question
but for NSTextView. It's a "hack" and will change the selection color
app-wide.
Assuming you want to change the default selection color, subclass
NSColor and override the method that is something like -
(NSColor*)selectedTextColor;
Then you'll have to make your subclass poseAsClass: [NSColor class].
You can either do that in main.m or directly in your subclass like so:
+ (void)load
{
[self poseAsClass: [NSColor class]];
// Or even like this:
// [self poseAsClass: [super class]];
// That part is up to you, which is more "cocoa like" I don't know.
}
Have fun!
Peace, Alan
--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that religion really is unnecessary, then it
shall evolve."
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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