Re: NSTextView text changes size
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.