• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing selection color in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing selection color in NSTextView


  • Subject: Re: Changing selection color in NSTextView
  • From: "Alan Smith" <email@hidden>
  • Date: Tue, 24 Apr 2007 17:04:03 -0400

Hello Sheen,

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


References: 
 >Changing selection color in NSTextView (From: sheen mac <email@hidden>)

  • Prev by Date: Simple Interface Connection Question
  • Next by Date: Re: NSPopUpButtonCell bindings help
  • Previous by thread: Changing selection color in NSTextView
  • Next by thread: Re: Changing selection color in NSTextView
  • Index(es):
    • Date
    • Thread