Skip to main content
Participant
Sep 6, 2010 6:48 AM UTC
Answered

How can I indent a whole paragraph?

Hello Forum

I'm taking a first stab at TLF and TextFlow markup. All works fine so far, but I'm unable to create a paragraph with an offset to the left. I was looking at the "Text Layout Editor" Demo (http://labs.adobe.com/technologies/textlayout/demos/), and the Left Margin property is exactly what I'm after. It works in the Demo, but if I use leftMargin="20" in my Markup, it either doesn't work, or I get an Error during compile time, saying: Cannot resolve attribute 'marginLeft' for component type flashx.textLayout.elements.ParagraphElement.

Can somebody give me a hint how I can achieve this? Did I miss something obvious?

This topic is closed to new replies. Start a new post to keep the conversation going.
stefan_van_dintherCorrect answer
Inspiring
Sep 7, 2010 8:00 AM UTC

I think the demo has been made with an older version of the tlf... marginLeft has been changed to paragraphStartIndent in the new tlf...

(to be more precise: marginLeft was part of the ParagraphFormat class which does not exist anymore, and paragraphStartIndent is now part of the TextLayoutFormat class)

2 replies

Participant
Sep 6, 2010 7:17 AM UTC

It seems like the paragraphStartIndent property is what I was looking for.

I'm still leaving this question as unanswered, maybe somebody can give me a clue why there's a discrepancy between the editor-demo and the implementation in Flex4?

Translate
stefan_van_dintherCorrect answer
Inspiring
Sep 7, 2010 8:00 AM UTC

I think the demo has been made with an older version of the tlf... marginLeft has been changed to paragraphStartIndent in the new tlf...

(to be more precise: marginLeft was part of the ParagraphFormat class which does not exist anymore, and paragraphStartIndent is now part of the TextLayoutFormat class)

Translate