NSTextView text coloring problem
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