• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [newbie] Font attributes in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie] Font attributes in NSTextView


  • Subject: Re: [newbie] Font attributes in NSTextView
  • From: Brian Webster <email@hidden>
  • Date: Mon, 9 Sep 2002 20:20:16 -0500

On Monday, September 9, 2002, at 06:12 PM, email@hidden wrote:

I have an NSTextView that'M addming lines to. I want some of these
lines to be bold (and perhaps in italics) and others to be plain text.
I've found out how to use NSAttributedString, but I cannot add an
attributed string to a text view.

How would I do this?

You can directly modify the text storage for the text view. Send the view a textStorage message to get its NSTextStorage, which is a subclass of NSMutableAttributedString. You can then use appendAttributedString: and other such methods to tack your own stuff on the end.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Fwd: Drawing directly to screen ?
  • Next by Date: Learning lex/yacc (was: Book- Building cocoa applications)
  • Previous by thread: Re: [newbie] Font attributes in NSTextView
  • Next by thread: Re: [newbie] Font attributes in NSTextView
  • Index(es):
    • Date
    • Thread