Skip to main content
February 1, 2011
Question

How can we add tab leaders to a textflow just as we do in Indesign?

  • February 1, 2011
  • 1 reply
  • 1031 views

Hi,

I have a scenario where in I have to simulate the Indesign's tab leaders in a textflow ,so for instance a user types in a tab with the leader on than he should get something like this

"Here I hit a tab.....see"

instead of what it would have normally done i.e.

"Here I hit a tab     see"

-Ashar

This topic has been closed for replies.

1 reply

Adobe Employee
February 1, 2011

I don't see an easy way to do that.  IMHO Tab leaders would require enhancements to FlashPlayer's flash text engine used by TLF.  Without that even a partially working feature would require a large investment.

Richard

February 2, 2011

Thanks Richard for the instance reply.

Can there be a work around for this?

-Ashar

Adobe Employee
February 3, 2011

Well if its really important I guess you could add the tab leaders as an adornment. Take a look at the blog post on decorations:

http://blogs.adobe.com/tlf/2011/01/decoration-example.html

You could do something similar, but generate a whole additional TextLine for the leader characters, based on the character positions of the character to the left and right of the tab. Given these positions and the textLine, you can get the atom x, y location. Then you have to guess how many leader characters you need, and put them in your own TextBlock, create a TextLine for the leaders, and add the leader TextLine as a child of the original TextLine (the one with the tab in it). Might require a little tuning to get right the number of characters to add in the leader.

That's my best guess at a workaround.

- robin