PDA

View Full Version : NSTextView -need help




rethish
Dec 10, 2008, 07:00 AM
hi all,

In my application I use an instance of NSTextView. The text content in the textview can be formatted -(text formatting ; eg changecase, changecolor, changefont ,fontsize , etc.. )- at the whole.

but i need to format only the portion of text that i use to select.

Is this possible ?

I tried a lot , please help ...


thankyou.



kainjow
Dec 10, 2008, 12:50 PM
Get its textStorage object, which is a subclass of NSMutableAttributedString, which has methods for setting attributes for a specific range.

rethish
Dec 15, 2008, 07:25 AM
thank you ,

I also found that it can be done using NSRange and setfont: range: method.