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

NSTextView text coloring problem


  • Subject: NSTextView text coloring problem
  • From: tyler durden <email@hidden>
  • Date: Wed, 23 Apr 2008 15:19:41 -0700 (PDT)

Hi Everybody,
I am reposting this since I haven't got any answers, yet.
Hope somebody helps this time around.

I am writing an easy chat application. I have an object of NSTextview on my UI form. I want to change the text color in a specified range from default color black to red. I used the method "setTextColor:range:" but it did not work. Following is my declaration of the object and the corresponding code.

More specifically, the code below is supposed to change color of a certain range of characters (in the following case, between 1st and the 6th chars) but it doesn't really work. it either changes the color of the whole text to red when I start from zero or it doesn't make any changes if I start from 1.


Any suggestions ?????

IBOutlet NSTextView* _view;

[(_view) setTextColor:[NSColor redColor] range: NSMakeRange(1,5)];



      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSTextView text coloring problem
      • From: Graham Cox <email@hidden>
    • Re: NSTextView text coloring problem
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: IB3 can't find my class
  • Next by Date: Re: NSTextView text coloring problem
  • Previous by thread: Re: Caching a local file using NSURLCache
  • Next by thread: Re: NSTextView text coloring problem
  • Index(es):
    • Date
    • Thread