• 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
text color in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

text color in NSTextView


  • Subject: text color in NSTextView
  • From: Todd Ransom <email@hidden>
  • Date: Mon, 25 Oct 2004 18:00:02 -0600

I have a text editing app based on NSTextView and a user has requested the ability to set foreground and background colors. I established a binding for background color and that works beautifully, but I am having problems with setting the text color. I see that NSTextView inherits the method setTextColor from NSText but it doesn't seem to do what the documentation leads me to believe it should do. The docs say "Sets the text color of all characters in the receiver..." but when I call setTextColor it only changes the color of newly typed characters. Existing text stays in whatever color it was before the change.

Ideally I would like to simply change the display font color for all characters in the textview, not the font used in the attributed string. I don't want the display settings to be saved with the document. Has anyone done this successfully?

thanks,
TR
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: text color in NSTextView
      • From: Todd Ransom <email@hidden>
    • Re: text color in NSTextView
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Aligning animation and songs
  • Next by Date: Re: uninstaller
  • Previous by thread: Re: NSMatrix / NSArrayController bindings
  • Next by thread: Re: text color in NSTextView
  • Index(es):
    • Date
    • Thread