layout_flow property

TextBox.layout_flow property

Determines the flow of the text layout in a shape.

@property
def layout_flow(self) -> aspose.words.drawing.LayoutFlow:
    ...

@layout_flow.setter
def layout_flow(self, value: aspose.words.drawing.LayoutFlow):
    ...

Remarks

The default value is LayoutFlow.HORIZONTAL.

Examples

Shows how to set the orientation of text inside a text box.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)
text_box_shape = builder.insert_shape(aw.drawing.ShapeType.TEXT_BOX, 150, 100)
text_box = text_box_shape.text_box
# Move the document builder to inside the TextBox and add text.
builder.move_to(text_box_shape.last_paragraph)
builder.writeln('Hello world!')
builder.write('Hello again!')
# Set the "layout_flow" property to set an orientation for the text contents of this text box.
text_box.layout_flow = layout_flow
doc.save(ARTIFACTS_DIR + 'Shape.text_box_layout_flow.docx')

See Also