Re: background of a range within an NSTextView
Re: background of a range within an NSTextView
- Subject: Re: background of a range within an NSTextView
- From: Greg Titus <email@hidden>
- Date: Fri, 25 Jan 2002 19:44:02 -0800
On Friday, January 25, 2002, at 07:20 PM, Simson L.Garfinkel wrote:
How do you set the background color for a range of text within an
NSTextView?
NSRange rangeYouWant;
NSColor *colorYouWant;
NSTextView *textViewContainingText;
[[textView textStorage] addAttribute:NSBackgroundColorAttributeName
value:colorYouWant range:rangeYouWant];
Hope this helps,
--Greg