Skip to main content
Adobe Employee
November 4, 2011
Question

ContainerBreaks and ColumnBreaks feature in TLF 3.0

  • November 4, 2011
  • 1 reply
  • 1779 views

Feature Description

Add a way for the user to force the text to break and continue on the next column or container.

It is an attribute, and you should either be able to apply it to an element to force it to be the last in the column or container, or the first in the next column or container.

Related Products

InDesign has special break characters that can be inserted to force text to continue on the next column, frame, page, even page, or odd page.

HTML has the <br/> element, which forces following text onto the next line.


The W3C also got a draft document to define the column break. Please refer to http://www.w3.org/TR/css3-multicol/#column-breaks

We bought in some of their definition and expand them to be the container break. Currently, we got the following attribute:

  1. columnBreakBefore
  2. columnBreakAfter
  3. containerBreakBefore
  4. containerBreakAfter

each of them may be set the value of:
auto
always
inherit

auto means:
Neither force nor forbid a container/column break before (after, inside) the generated box.

always means:
Always force a container/column break before (after) the generated box.

inherit means:
Inherit the setting from the parent elements

This topic has been closed for replies.

1 reply

Jin-HuangAuthor
Adobe Employee
November 4, 2011

Example of how to use ColumnBreak/ContainerBreak

public class ColumnBreak extends Sprite

{

    public var textFlow:TextFlow = new TextFlow();

    public function ColumnBreak()

    {

        var para1String:String = "Paragraph1";

        var para2String:String = "Paragraph2";

        var listElement:ListElement = new ListElement();

        var listItemElement1:ListItemElement = new ListItemElement();

        var listItemElement2:ListItemElement = new ListItemElement();

        var paragraph1:ParagraphElement = new ParagraphElement();

        var paragraph2:ParagraphElement = new ParagraphElement();

        var spanElement:SpanElement = new SpanElement();

        spanElement.text = para1String;

        paragraph1.addChild(spanElement);

        spanElement = new SpanElement();

        spanElement.text = para2String;

        paragraph2.addChild(spanElement);

        listItemElement1.addChild(paragraph1);

        listItemElement2.addChild(paragraph2);

        listElement.addChild(listItemElement1);

        listElement.addChild(listItemElement2);

        textFlow.addChild(listElement);

                var tlFmt:TextLayoutFormat = new TextLayoutFormat();

                tlFmt.ColumnBreakAfter  = BreakStyle.ALWAYS;

                paragraph1.format = tlFmt;

        var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();

        textLayoutFormat.columnCount = 3;

        textFlow.hostFormat = textLayoutFormat;

        var sprite:Sprite = new Sprite();

        addChild(sprite);

        textFlow.flowComposer.addController(new ContainerController(sprite, 400, 200) );

        textFlow.flowComposer.updateAllControllers();

    }

}