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.RowHeight class

Package: mlreportgen.dom
Superclasses:

Height of table row

Description

Specifies the height of a table row.

Construction

rowHeightObj = RowHeight() specifies row height to be 1 inch.

rowHeightObj = RowHeight(height) sets a row to the specified height.

rowHeightObj = RowHeight(height,heightType) sets a row to be exactly the specified height or at least the specified height. Applies only to Microsoft® Word documents.

Input Arguments

expand all

Height of table row, in the form valueUnits, where Units is an abbreviation for the units. These abbreviations are valid:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Type of row height measurement, specified as 'exact' for the exact height specified or 'atleast' for the specified height or taller.

Output Arguments

expand all

Row height, represented by an mlreportgen.dom.RowHeight 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.

Type of height measure, specified as 'exact' for exactly the specified height or 'atleast' for the specified height or taller.

Height of table row in the form valueUnits, where Units is an abbreviation for the units. These abbreviations are valid:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Examples

expand all

Create a table with two rows. The first row has a variable height and the second has a fixed maximum height.

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

t = Table(2);
t.Style = {Border('solid'),RowSep('solid'),ColSep('solid')};
t.Width = '1in';
r1 = TableRow();
r1.Style = {RowHeight('.25in','atleast')};
append(r1,TableEntry(...
    'This row can expand beyond .25 inches'));
append(r1,TableEntry('x'));

r2 = TableRow();
r2.Style = {RowHeight('.25in','exact')};
append(r2,TableEntry...
    ('Truncated text because height is fixed'));
append(r2,TableEntry('x'));

append(t,r1);
append(t,r2);
append(d,t);

close(d);
rptview('myTableDoc','docx');
Was this topic helpful?