Skip to main content
Inspiring
Apr 25, 2010 7:26 PM UTC
Answered

Paragraph Padding

I'm trying to change the padding of a paragraph using this (doesn't work):

var pf:TextLayoutFormat = new TextLayoutFormat();
pf.paddingRight = 50;

IEditManager( textFlow.interactionManager ).applyParagraphFormat(pf);

I have several paragraph, but only want to change the padding of one of them. If I do this, I can change the padding of all paragraphs (the container padding):

var pf:TextLayoutFormat = new TextLayoutFormat();
pf.paddingRight = 50;

IEditManager( textFlow.interactionManager ).applyContainerFormat(pf);

Any ideas?

This topic is closed to new replies. Start a new post to keep the conversation going.
rdermerCorrect answer
Inspiring
Apr 30, 2010 12:29 AM UTC

4 replies

Adobe Employee
Apr 26, 2010 4:08 AM UTC

Padding on paragraphs is not implemented in TLF 1.0, only padding on containers, as you note. However, you can get pretty much the same effect by using paragraphSpaceBefore and paragraphSpaceAfter properties. You can set this on the TextFlow, and it gets inherited and applied to the paragraphs, or you can set it on individual paragraphs.

- robin

Translate
oscar7878Author
Inspiring
Apr 29, 2010 10:39 PM UTC

Thanks Robin. Any work around for paddingLeft and paddingRight?

Translate
rdermerCorrect answer
Inspiring
Apr 30, 2010 12:29 AM UTC