Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Space Between Two Span Elements in Same Paragraph

New Here ,
Oct 08, 2009 Oct 08, 2009

Hi

     I m creating an application using TextLayout Framework in FlexBuilder3(Sdk3.4).

Code is like

          var paragraphElement:ParagraphElement= new  ParagraphElement();

          var spanElement1:SpanElement= new SpanElement():

          spanElement1.text = "A";

          paragraphElement.addChild(spanElement1);

          var spanElement2:SpanElement= new SpanElement():

          spanElement2.text = "A";

          paragraphElement.addChild(spanElement2);

     OutPut of above code is Like:-  AB.

But i want Space between these two spans is of   margin= 27.

So how can i create space between these two spans. if anybody know please reply.

Thanks

TOPICS
Text layout framework
6.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 08, 2009 Oct 08, 2009

You could add tracking values to the second span to push it away. So if you have this:

<span>A</span><span>B</span>

You could add 27 pixels of space by doing this:

<span>A</span><span trackingLeft="27">B</span>

- robin

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 08, 2009 Oct 08, 2009

Hi Robin

      Thanks for replying, I already tried it with trackingleft , it is Quite useful if i have Only single character in the Span Element.

But if i have a complete word Like

                                        <spanElement>A</spanElement><spanElement trackingLeft="27">Robin</spanElement>

Then the output is like A   R  o  b  i  n

i.e. Tracking left is on all characters.

U can try this on above code by replacing B by Robin.

If any Solution please let me know

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 12, 2009 Oct 12, 2009
LATEST

In order to get this to work, you'll have to break off the first character in the second span into its own span.

- robin

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines