• 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: NSTextView text changes size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView text changes size


  • Subject: Re: NSTextView text changes size
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 27 Nov 2002 15:57:22 -0800

On Wednesday, November 27, 2002, at 03:45 PM, Daryn wrote:

If you really don't care what font is used, you can do what you are doing, i.e. never specify a font and let the text view figure one out for itself. If you do care, then set the font yourself, either via the NSTextView, by calling setTypingAttributes: or setFont:, or else by operating on the NSTextStorage and setting a font attribute there.

If the strings being appended are attributed strings, using these messages to force a font cause the existing front traits such as boldness to be lost as well (last I checked).

The original message in this thread explicitly specified that plain strings were being set, with an API that allows only for plain strings. It is because of that that the typing attributes were being applied to the string. If you have attributed strings, just modify the NSTextStorage directly.

Douglas Davidson
_______________________________________________
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.

References: 
 >Re: NSTextView text changes size (From: Daryn <email@hidden>)

  • Prev by Date: Re: NSPipes and NSTask, and a file descriptor leak
  • Next by Date: Re: 5-channel CMYKA image fails to give TIFFRepresentation
  • Previous by thread: Re: NSTextView text changes size
  • Next by thread: Re: NSTextView text changes size
  • Index(es):
    • Date
    • Thread