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

Package: mlreportgen.dom
Superclasses:

Display option for DOM objects

Description

For Microsoft® Word reports, specifies whether to display an mlreportgen.dom.Text object. For HTML reports, specifies how to display DOM objects such as text, paragraphs, images, and list items.

Construction

disp = Display() in an HTML report displays a DOM object as an inline element. Word reports ignore mlreportgen.dom.Display objects that you create with this syntax.

disp = Display(value) applies the specified display value to the DOM object. For Word reports, the display option you can use is none and the only DOM object it applies to is a Text object.

Input Arguments

expand all

Display option, specified as a character vector. The default option is inline.

For Microsoft Word and PDF reports, the only supported option is none.

ValueDisplay of Text or Paragraph Object

'inline'

Inline element (similar to an HTML <span> element). (Default)

'block'

Block element (similar to an HTML <span> element).

'flex'

Block-level flex container.

'initial'

Uses the default value of inline.

'inline-block'

Inline-level block container. Displays the inside of the block as a block-level box, and formats the object itself as an inline-level box.

'inline-flex'

Inline-level flex container.

'inline-table'

Inline-level table.

'list-item'

Similar to an HTML <li> bulleted list element.

'none'

Not displayed (has no effect on layout).

This is the only display option that applies to Word and PDF reports. In Word, if you enable File > Options > Display > Hidden text, the text displays in the report.

'run-in'

As block or inline, depending on the context. For example, if the object is inside a block, the object displays as a block.

'table'

Similar to an HTML <table> element.

'table-caption'

Similar to an HTML <caption> element.

'table-cell'

Similar to an HTML <td> element.

'table-column'

Similar to an HTML <col> element.

'table-column-group'

Similar to an HTML <colgroup> element.

'table-footer-group'

Similar to an HTML <tfoot> element.

'table-header-group'

Similar to an HTML <thead> element.

'table-row'

Similar to an HTML <tr> element.

'table-row-group'

Similar to an HTML <tbody> element.

Note

The Display class does not support the CSS display value of inherit.

For details about the CSS display property, see http://www.w3schools.com/cssref/pr_class_display.asp.

Properties

expand all

A session-unique ID is generated as part of Display object creation. You can specify an ID to replace the generated ID.

Tag for Display object, specified as a character vector.

A session-unique ID is generated as part of HTML object 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.

Specify your own tag value, for example, to make it easier to identify where an issue occurred during presentation generation.

Display option, specified as a character vector. For a list of options, see the description of the value constructor input argument.

Examples

expand all

In Word, make sure the File > Options > Display > Hidden text option is cleared. This is the default setting.

import mlreportgen.dom.*;
rpt = Document('MyDispRep','docx');
t1 = Text('Hello');
t1.Style = {Display('none')};
p1 = Paragraph();
append(p1,t1);
t2 = Text('World');
append(p1,t2);
append(rpt,p1);
close(rpt);
rptview('MyDispRep','docx');

Introduced in R2015b

Was this topic helpful?