NSTextView -need help

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

  1. rethish macrumors member

    Joined:
    Oct 16, 2008
    #1
    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.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    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

    Joined:
    Oct 16, 2008
    #3
    thank you ,

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

Share This Page