1

I am trying to change the preset tabstops in an NSTextView. I found an old post form 2002 which says it is possible to do this from within Interface Builder by showing the ruler of the NSTextView and then editing the tabs on it:

http://www.cocoabuilder.com/archive/cocoa/14409-tabs-in-nstextview.html Briefly: "Double click the NSTextView and switch on the ruler using the Fromat->Ruler->Show Menu."

This does not seem to work in the current Interface Builder. I cannot even find the described menu. Is this option no longer available in Xcode/IB 3.2.5?

Cheers, Gregor

gha
  • 3,459
  • 3
  • 18
  • 13

1 Answers1

0

I don't believe the option is available any longer. The only one that's there is the ability to toggle whether the text view can use the ruler. I'd just use an outlet to it to send it a [myTextView setRulerVisible:YES]; on -awakeFromNib and be done with it.

Joshua Nozzi
  • 60,946
  • 14
  • 140
  • 135
  • Hi, thanks for responding! The thing is that I want to use the ruler in IB to preset tabstobs for the textfield. If I cannot show the ruler in IB, is there an alternative way to preset the tabstobs? – gha Jan 06 '11 at 20:50
  • 1
    To set the tab stops, create an NSParagraphStyle object with the tab stops and default tab stop interval, and set it as the text view's default paragraph style. – ughoavgfhw Jan 06 '11 at 21:31
  • "ughoavgfhw" (if in fact that is his/her *real* name - I suspect it's not, but I could be wrong and demonstrating an embarrassing but typical American lack of cultural tolerance - embarrassing for the US, not me - though the US often embarrasses itself without realizing it - I blame this on lack of cultural sensitivity in schools) is correct. You can configure everything about the ruler on -awakeFromNib or -applicationDidFinishLaunching: programmatically. – Joshua Nozzi Jan 06 '11 at 21:40