Re: NSTextView: How do you allow highlighted (selected) areas to change vs the ENTIRE view?
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