mlreportgen.dom.Width Class
Namespace: mlreportgen.dom
Object width
Description
Specifies the width of an object, such as an image or a table entry.
The mlreportgen.dom.Width
class is a handle
class.
Creation
Description
Input Arguments
Width of object, specified as character vector or string scalar
that contains a number followed by an abbreviation for a unit of
measurement. For example, "10px"
specifies 10 pixels. Valid abbreviations are:
px
— Pixelscm
— Centimetersin
— Inchesmm
— Millimeterspc
— Picaspt
— Points%
— Percent
Properties
Width of object, specified as character vector or string scalar that
contains a number followed by an abbreviation for a unit of
measurement. For example, "10px"
specifies 10 pixels.
Valid abbreviations are:
px
— Pixelscm
— Centimetersin
— Inchesmm
— Millimeterspc
— Picaspt
— Points%
— Percent
Example: "5pt"
The resulting width of a column depends on the types of widths (absolute or fractional (%) of table width) that you use for each table entry. Setting the width of the entire column, or setting a table entry to resize to fit its contents also affect the resulting column width.
Table Entry Width Setting | Resulting Column Width |
---|---|
Two or more table entries set to different absolute widths | Maximum of the absolute widths |
Two or more table entries set to different fractional widths, expressed as a percent (%) of the table width | Maximum of the fractional widths |
Mixture of table entries set to absolute widths and fractional widths | For PDF output, maximum of the absolute
widths. For all other output formats (for example, Word and HTML), the output application determines the maximum column width to use. |
One or more table entry widths set to
absolute widths or fractional widths, and the
column width set using mlreportgen.dom.TableColSpecGroup | Maximum of the specified table entry widths and the column width |
One or more table entry widths set to
absolute widths or fractional widths, and mlreportgen.dom.ResizeToFitContents set
to true | For PDF output, maximum of the table entry
widths. For all other output formats, maximum of the resized-to-fit table entry widths. |
Tag, 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. Use this value to help identify
where an issue occurs during document generation.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Object identifier, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Examples
import mlreportgen.dom.*; doctype = "html"; d = Document("test",doctype); t = Table(magic(5)); t.Style = {Border("inset","crimson","6pt"),... Width("50%")}; t.TableEntriesInnerMargin = "6pt"; t.TableEntriesHAlign = "center"; t.TableEntriesVAlign = "middle"; append(d,t); close(d); rptview("test",doctype);
Version History
Introduced in R2014b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)