• 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: NSTextView: How do you allow highlighted (selected) areas to change vs the ENTIRE view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView: How do you allow highlighted (selected) areas to change vs the ENTIRE view?


  • Subject: Re: NSTextView: How do you allow highlighted (selected) areas to change vs the ENTIRE view?
  • From: Joshua Scott Emmons <email@hidden>
  • Date: Wed, 25 Jan 2006 16:54:16 -0600

I can't change a highlighted area within a NSTextView; only the ENTIRE view is changed (color, font characteristic, etc.).

Is there a flag or something to set?


Generally speaking, you obtain the rangesForUserTextChange, rangesForUserCharacterAttributeChange, or rangesForUserParagraphAttributeChange, depending on what you're doing, and then modify those ranges in the text storage.

You'll also want to look at -[NSTextView setRichText:]

"Controls whether the text views sharing the receiver’s NSLayoutManager allow the user to apply attributes to specific ranges of the text."


Cheers, -Joshua Emmons _______________________________________________ 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
References: 
 >NSTextView: How do you allow highlighted (selected) areas to change vs the ENTIRE view? (From: "Frederick C. Lee" <email@hidden>)
 >Re: NSTextView: How do you allow highlighted (selected) areas to change vs the ENTIRE view? (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: NSTextView: How do you allow highlighted (selected) areas to change vs the ENTIRE view?
  • Next by Date: Re: TextView Autoresizing Mask problems
  • Previous by thread: Re: NSTextView: How do you allow highlighted (selected) areas to change vs the ENTIRE view?
  • Next by thread: filtering in NSTreeController
  • Index(es):
    • Date
    • Thread