Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"setTextColor:range:" text coloring problem



Hi Everybody,

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 " my 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 ????? 
thank you in advance.


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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.