メインコンテンツ

mlreportgen.dom.Width Class

Namespace: mlreportgen.dom

Width of DOM object

Description

Specifies the width of a document element (DOM) object, such as an image or a table entry.

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

Creation

Description

widthObj = Width creates a format object that specifies a width of 1 inch.

widthObj = Width(value) creates a width object having the specified width.

example

Input Arguments

expand all

Width of object, specified as a 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:

  • no abbreviation — Pixels

  • px — Pixels

  • cm — Centimeters

  • in — Inches

  • mm — Millimeters

  • pc — Picas

  • pt — Points

  • % — Percent

Properties

expand all

Width of object, specified as a 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:

  • no abbreviation — Pixels

  • px — Pixels

  • cm — Centimeters

  • in — Inches

  • mm — Millimeters

  • pc — Picas

  • pt — Points

  • % — Percent

Example: "5pt"

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

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

collapse all

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