Skip to main content
Participating Frequently
November 12, 2009
Answered

TabStop vs. Spaces

  • November 12, 2009
  • 1 reply
  • 821 views

Hey,

This might be a slightly unrelated question, but I've seen a Flash Text Engine guy post in here so I'll give it a try. You guys quite probably also know the answer to this one. So:

For a simple tab-becomes-spaces type of rendering, which is default/common in source code editors, \t is expanded to become spaces or just rendered as a 4/8-space tab.

Is there any way to do such a thing with TextBlock.tabStops or any other FTE feature?

Is this done anywhere in TLF maybe?

It seems like tabStops work more like tabs in a normal word editor, is that the idea?

Thanks

Erik

This topic has been closed for replies.
Correct answer rdermer

Looks like you created 5 tabs at the same spot.  Did you mean to use 20,40,60,80,100 as the locations?

Richard

1 reply

Adobe Employee
November 12, 2009

Currently there is no "repeated" TabStop - that is a way to assign a TabStop to textBlock.tabStops that says I'd like a tab every N pixels.

In player 10.1 there is a non-configurable built in default tab stop every 48 pixels -  unless there is a user specified TabStop specified further out on the line.

The only way to do get the mono-spaced tab effect would be to add your own tabStop every N pixels.

Richard

mjewlAuthor
Participating Frequently
November 13, 2009

Is Flex 3.3.0.4852 & the AIR version that comes with that enough to use this?

-snip-

var t:Vector.<TabStop> = new Vector.<TabStop>();

t.push( new TabStop(TabAlignment.START, 20) );

t.push( new TabStop(TabAlignment.START, 20) );

t.push( new TabStop(TabAlignment.START, 20) );

t.push( new TabStop(TabAlignment.START, 20) );

t.push( new TabStop(TabAlignment.START, 20) );

textBlock.tabStops = t

textBlock.content = groupElement;

textLine = textBlock.createTextLine(null, 800);

-snip-

That doesn't render \t\t\tText at all, however \tText and \t\tText is rendered correctly.Am I doing something wrong?

rdermerCorrect answer
Adobe Employee
November 16, 2009

Looks like you created 5 tabs at the same spot.  Did you mean to use 20,40,60,80,100 as the locations?

Richard