Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.TextOrientation class

Package: mlreportgen.dom
Superclasses:

Orientation of text in a table entry

Description

Specifies the orientation for text in a table entry.

Construction

textOrientationObj = TextOrientation() causes text to flow from left to right and for the first column to be on the left side of a table.

textOrientationObj = TextOrientation(orientation) causes text in a table entry to display with the specified orientation.

Input Arguments

expand all

Text orientation, specified as one of these values:

  • 'horizontal' — text is horizontal in the text entry

  • 'down' — text is vertical, with the first character at the top

  • 'up' — text is vertical, with the first character at the bottom

Output Arguments

expand all

Text orientation, returned as an mlreportgen.dom.TextOrientation object.

Properties

expand all

ID for this document element, specified as a character vector. The DOM generates a session-unique ID when it creates the document element. You can specify your own ID.

Tag for document element, specified as a character vector.

A session-unique ID is generated as part of document element creation. The generated tag has the form CLASS:ID, where CLASS is the class of the element and ID is the value of the Id property of the object. You can specify a tag to replace the generated tag.

For example, to make it easier to identify where an issue occurred during document generation, you can specify your own tag value.

Text orientation, specified as one of these values:

  • 'horizontal' — text is horizontal in the text entry

  • 'down' — text is vertical, with the first character at the top

  • 'up' — text is vertical, with the first character at the bottom

Examples

expand all

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

HeadStyle = {Bold,OuterMargin('0in')};
ch1 = Paragraph('Col1');
ch1.Style = HeadStyle;
ch2 = Paragraph('Col2');
ch2.Style = HeadStyle;

t = Table({ch1,ch2;'entry1','entry2'});
EntryStyle = {TextOrientation('down'),VAlign('middle')};
t.entry(1,1).Style = EntryStyle;
t.entry(1,2).Style = EntryStyle;
t.row(1).Style = {RowHeight('24pt','atleast')};
append(d,t);

close(d);
rptview(d.OutputPath);
Was this topic helpful?