NSTextView -need help

Discussion in 'Mac Programming' started by rethish, Dec 10, 2008.

  1. rethish macrumors member

    Oct 16, 2008
    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 ...

  2. kainjow Moderator emeritus


    Jun 15, 2000
    Get its textStorage object, which is a subclass of NSMutableAttributedString, which has methods for setting attributes for a specific range.
  3. rethish thread starter macrumors member

    Oct 16, 2008
    thank you ,

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

Share This Page