• 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: NSTextView tab stop count
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView tab stop count


  • Subject: Re: NSTextView tab stop count
  • From: Shane Stanley <email@hidden>
  • Date: Sat, 15 Oct 2016 10:22:08 +1100

On 15 Oct. 2016, at 12:43 am, tridiak <email@hidden> wrote:
>
> This works up to 12. Above that, it sticks to 12.

Are you sure you're just not seeing them because the text in some columns is longer than you tab width?

I just made a simple example with this:

    NSMutableAttributedString *mas = [[NSMutableAttributedString alloc] initWithString:@"\t1\t2\t3\t4\t5\t6\t7\t8\t9\t10\t11\t12\t13\t14\t15\t16\t17\t18\t19\t20\t21\t22\t23\t24\t25\t26\t27\t28\t29\t30"];
    NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
    NSMutableArray* ma=[NSMutableArray array];
    for (int t=0; t< 31; t++) {
        [ma addObject:[[NSTextTab alloc] initWithType:NSLeftTabStopType location:t*28.0f]];
    }
    [style setTabStops:ma];
    [mas addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0,mas.length)];
    [self.textView insertText:mas];

It works as expected.

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>



_______________________________________________

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


  • Follow-Ups:
    • Re: NSTextView tab stop count
      • From: tridiak <email@hidden>
References: 
 >NSTextView tab stop count (From: tridiak <email@hidden>)

  • Prev by Date: Re: Getting/Setting FinderInfo attributes using native Cocoa API?
  • Next by Date: Re: HandOff Problems
  • Previous by thread: Re: NSTextView tab stop count
  • Next by thread: Re: NSTextView tab stop count
  • Index(es):
    • Date
    • Thread