Re: setting tab stops in a document
Re: setting tab stops in a document
- Subject: Re: setting tab stops in a document
- From: "Paul Sanders" <email@hidden>
- Date: Sat, 5 Jun 2010 10:27:33 +0100
> When my application opens a text file, the insertion point is blinking immediately after the last character on the last line. If I then hit the tab key, the insertion point moves over the correct distance. However, if I hit the return key when the file is first opened, the insertion point moves to the start of the next line; if I then hit the tab key the insertion point moves it over too few spaces (presumably the default distance rather than what I tried to set in the above code).
> What am I missing?
[NSTextView setTypingAttributes:] is what you are looking for. Setting them is an all-or-nothing affair so, typically, you get them, change what you want to change in a mutable copy of the NSDictionary returned and and then set them.
Regards,
Paul Sanders.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden