Main Content

mlreportgen.dom.Border Class

Namespace: mlreportgen.dom

Table border properties

Description

Use an object of the mlreportgen.dom.Border class to specify table borders.

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

Creation

Description

borderObj = mlreportgen.dom.Border creates a border with empty properties.

borderObj = mlreportgen.dom.Border(style) creates a border and sets the Style property to style.

borderObj = mlreportgen.dom.Border(style,color) also specifies the default color for all border segments and sets the Color property to color

borderObj = mlreportgen.dom.Border(style,color,width) also specifies the default width for all border segments and sets the Width property to width

example

Input Arguments

expand all

Type of border to draw, specified as one of the values in the table. This argument sets the Style property.

Border StyleDescriptionSupported in Microsoft® WordSupported in HTML and PDF
"dashed"Dashed lineyesyes
"dashdotstroked"Line with alternating diagonal dashes and dotyesyes
"dashsmallgap"Dashed line with a small gap between dashesyesyes
"dotted"Dotted lineyesyes
"dotdash"Line with alternating dots and dashesyesno
"dotdotdash"Line with alternating double dots and a dashyesno
"double"Double lineyesyes
"doublewave"Double wavy lineyesno
"groove"3-D effect grooved linenoyes
"hidden"

No line

When there is a conflicting border style, the "hidden" border style takes precedence over the conflicting border style, which results in no line displaying.

noyes
"inset"3-D effect linenoyes
"none"

No line

When there is a conflicting border style, the conflicting border style takes precedence over "none", which results in the conflicting border style displaying.

yesyes
"outset"3-D effect lineyesyes
"ridge"3-D effect ridged linenoyes
"single"Single lineyesyes
"solid"Single linenoyes
"thick"Thick lineyesno
"thickthinlargegap"Dashed line with alternating thick and thin dashes with a large gapyesno
"thickthinmediumgap"Dashed line with alternating thick and thin dashes with a medium gapyesno
"thickthinsmallgap"Dashed line with alternating thick and thin dashes with a small gapyesno
"thinthicklargegap"Dashed line with alternating thin and thick dashes with a large gapyesno
"thinthickmediumgap"Dashed line with alternating thin and thick dashes with a medium gapyesno
"thinthicksmallgap"Dashed line with alternating thin and thick dashes with a small gapyesno
"thinthickthinlargegap"Dashed line with alternating thin and thick dashes with a large gapyesno
"thinthickthinmediumgap"Dashed line with alternating thin and thick dashes with a medium gapyesno
"thinthickthinsmallgap"Dashed line with alternating thin and thick dashes with a small gapyesno
"threedemboss"Embossed effect lineyesno
"threedengrave"Engraved effect lineyesno
"triple"Triple lineyesno
"wave"Wavy lineyesno

Note

For Microsoft Word reports, when you assign an mlreportgen.dom.Border object to the Style property of an mlreportgen.dom.TableHeaderEntry, mlreportgen.dom.TableEntry, or mlreportgen.dom.HorizontalRule object, the reporter does not support "inset" or "outset" styles for this property.

Color of the border, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.

  • To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.

  • To specify a hexadecimal RGB format, use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example, "#0000ff" specifies blue.

Example: "blue"

Example: "#0000ff"

This argument sets the Color property.

Width of the border, specified as character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "3pt" specifies three points. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

Example: "3pt" specifies three points.

This argument sets the Width property.

Note

Microsoft Word has additional border width limitations:

  • Microsoft Word limits the width of borders to the range of 0.25pt to 6pt. Out of range width assignments trigger a warning or error message depending on your chosen border style.

  • Along with the range limit, these border styles have additional limitations:

    • "dashdotstroked": 3pt

    • "doublewave": 0.75pt

    • "thinthickthinmediumgap": 0.25–4.5pt

    • "thinthickthinsmallgap": 1.5–6pt

    • "threedemboss": 0.75–6pt

    • "threedengrave": 0.75–6pt

    • "triple": 0.5–3pt

    • "wave": 0.75–1.5pt

Properties

expand all

Default style of the border segments, specified as one of the values in the table in the style input argument.

Example: "3pt" specifies three points.

Attributes:

NonCopyable
true

Data Types: char | string

Color of the border segments, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.

  • To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.

  • To specify a hexadecimal RGB format, use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example, "#0000ff" specifies blue.

Example: "blue"

Example: "#0000ff"

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Width of the border, specified as character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "3pt" specifies three points. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

Example: "3pt" specifies three points.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: string | char

Top border segment style, specified as one of the values in the table in the style input argument.

Attributes:

NonCopyable
true

Data Types: string | char

Color of the top border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.

  • To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.

  • To specify a hexadecimal RGB format, use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example, "#0000ff" specifies blue.

Example: "blue"

Example: "#0000ff"

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Width of the top border segment, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "3pt" specifies three points. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

Example: "3pt" specifies three points.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Left border segment style, specified as one of the values in the table in the style input argument.

Attributes:

NonCopyable
true

Data Types: string | char

Color of the left border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.

  • To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.

  • To specify a hexadecimal RGB format, use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example, "#0000ff" specifies blue.

Example: "blue"

Example: "#0000ff"

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Width of the left border segment, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "3pt" specifies three points. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

Example: "3pt" specifies three points.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Bottom border segment style, specified as one of the values in the table in the style input argument.

Attributes:

NonCopyable
true

Data Types: string | char

Color of the bottom border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.

  • To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.

  • To specify a hexadecimal RGB format, use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example, "#0000ff" specifies blue.

Example: "blue"

Example: "#0000ff"

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Width of the bottom border segment, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "3pt" specifies three points. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

Example: "3pt" specifies three points.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Right border segment style, specified as one of the values in the table in the style input argument.

Attributes:

NonCopyable
true

Data Types: string | char

Color of the right border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.

  • To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.

  • To specify a hexadecimal RGB format, use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example, "#0000ff" specifies blue.

Example: "blue"

Example: "#0000ff"

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Width of the right border segment, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "3pt" specifies three points. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

Example: "3pt" specifies three points.

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

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

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";
append(d,t);
close(d);
rptview("test",doctype);

Version History

Introduced in R2014b