• 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
Creating a single Tab Stop in an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating a single Tab Stop in an NSTextView


  • Subject: Creating a single Tab Stop in an NSTextView
  • From: Ian was here <email@hidden>
  • Date: Tue, 17 Jan 2006 08:46:04 -0800 (PST)

I'm trying to reset the position of the first tab stop
within my text view. I would like it to be at position
48. For some reason the following code doesn't seem to
do the trick. Has anyone else done something similar
to this?



NSMutableParagraphStyle	    *theParagraphStyle =
[[NSMutableParagraphStyle alloc] init];
NSTextTab			    *textTab = [[NSTextTab alloc]
initWithType:NSLeftTabStopType location:48.0];

NSArray	         *tabStop = [[NSArray alloc]
initWithObjects:textTab, nil];


[theParagraphStyle setTabStops:tabStop];
[textView setDefaultParagraphStyle:theParagraphStyle];

[tabStop release];
[textTab release];
[theParagraphStyle release];

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Creating a single Tab Stop in an NSTextView
      • From: Patrick Meirmans <email@hidden>
  • Prev by Date: Re: Q: "Linking" to mail messages?
  • Next by Date: Re: [Core Data] Improve save performance ?
  • Previous by thread: Re: Stuck in basic bindings
  • Next by thread: Re: Creating a single Tab Stop in an NSTextView
  • Index(es):
    • Date
    • Thread