Main Content

mlreportgen.dom.FlowDirection Class

Namespace: mlreportgen.dom

Direction of text or table column flow

Description

Specifies the direction for text to flow across a page or the order of columns.

The mlreportgen.dom.FlowDirection class is a handle class.

Creation

Description

flowDirectionObj = FlowDirection causes text to flow from left to right and for the first column to be on the left side of a table.

flowDirectionObj = FlowDirection(flow) causes text to flow or column to appear in the specified direction (left-to-right or right-to-left).

example

Input Arguments

expand all

Direction for text to flow or for table columns to appear, specified as one of these values:.

  • 'ltr' — text flow or table column order is from left to right

  • 'rtl' — text flow or table column order is from right to left

Properties

expand all

Object identifier for the mlreportgen.dom.FlowDirection object, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object. You can specify your own value for Id.

Attributes:

NonCopyable
true

Data Types: char | string

Tag for the mlreportgen.dom.FlowDirection object, specified as a character vector or string scalar. The DOM API generates a session-unique tag as part of the creation of this object. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object. Specify your own tag value to help you identify where to look when an issue occurs during document generation.

Attributes:

NonCopyable
true

Data Types: char | string

Text flow direction or column order direction, specified as one of these values:

  • 'ltr' — text flow or table column order is from left to right

  • 'rtl' — text flow or table column order is from right to left

Examples

collapse all

In this example, setting the FlowDirection changes the direction of the text. Use rtl for languages written from right to left and ltr for those written from left to right.

import mlreportgen.dom.*;
doctype = 'docx';
d = Document('test',doctype);

p = Paragraph('Pie is the best dessert.');
p.Style = {FlowDirection('rtl')};
append(d,p);

q = clone(p);
q.Style = {FlowDirection('ltr')};
append(d,q);

close(d);
rptview(d.OutputPath);   

Version History

Introduced in R2014b