Re: Removing all paragraph settings from a textview
Re: Removing all paragraph settings from a textview
- Subject: Re: Removing all paragraph settings from a textview
- From: Douglas Davidson <email@hidden>
- Date: Mon, 7 Oct 2002 10:19:05 -0700
On Sunday, October 6, 2002, at 03:10 AM, Gerben Wierda wrote:
Now, when I have a NSTextView with in it RTF-data which ends with a
indented paragraph, and when I call [aView
resetParagraphStyleAndClear] and when I then add plain text strings to
that view, as in:
A] [aView setString:[self stringFromFileContents:fileName]];
I would expect that the information is not indented. But it is.
When I add data with
B] [[aView textStorage] appendAttributedString:
[[[NSAttributedString alloc]
initWithString: aString attributes:[aView
fixedAttr]] autorelease]];
it is not indented.
How can I set the view to a (completely initial) state where A] also
is displayed non-indented?
If you want detailed control over the attributes of the text, you are
probably better off dealing at the model level, with the text storage,
rather than talking to it through the view. If you really want to deal
with this at the view level, then you will probably need to set the
typing attributes as well.
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.