• 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: setting tab stops in a document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >setting tab stops in a document (From: Boyd Collier <email@hidden>)

  • Prev by Date: Cocoa: dragging files from Finder
  • Next by Date: Re: Monster memory leak and I can't figure out why
  • Previous by thread: Re: setting tab stops in a document
  • Next by thread: Focus and selection color of a NSTextView
  • Index(es):
    • Date
    • Thread