• 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: background of a range within an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: background of a range within an NSTextView
      • From: "Simson Garfinkel" <email@hidden>
References: 
 >background of a range within an NSTextView (From: "Simson L.Garfinkel" <email@hidden>)

  • Prev by Date: Re: NSTableView edit text-field help please?
  • Next by Date: Re: How viable is Cocoa development?
  • Previous by thread: background of a range within an NSTextView
  • Next by thread: Re: background of a range within an NSTextView
  • Index(es):
    • Date
    • Thread