Main Content

mlreportgen.dom.BorderCollapse Class

Namespace: mlreportgen.dom

Collapse HTML table borders

Description

Specifies whether to collapse table borders. This class applies only to HTML tables.

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

Creation

Description

borderCollapseObj = BorderCollapse creates an unspecified format. Nothing is inserted in the generated table markup.

borderCollapseObj = BorderCollapse(value) creates a border collapse object having the specified value.

Input Arguments

expand all

Setting to specify whether to collapse table borders, specified as 'on' to collapse or 'off' to leave the table and adjacent cell borders separate.

Properties

expand all

Setting to specify whether to collapse table borders, specified as 'on' to collapse or 'off'to leave the table and adjacent cell borders separate.

Attributes:

NonCopyable
true

Data Types: char | string

Object identifier for the mlreportgen.dom.BorderCollapse object, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object. You can specify your own value for Id.

Attributes:

NonCopyable
true

Data Types: char | string

Tag for the mlreportgen.dom.BorderCollapse object, 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. Specify your own tag value to help you identify where to look when an issue occurs during document generation.

Attributes:

NonCopyable
true

Data Types: char | string

Examples

collapse all

import mlreportgen.dom.*;
doctype = 'html';
d = Document('test',doctype);

magicArray = magic(5);

p = Paragraph('Collapsed Borders');
append(d,p);
table = Table(magicArray);
table.Style = {Border('solid'),BorderCollapse('on')};
     for r = 1:5
         for c = 1:5
             table.entry(r,c).Style = {Border('solid')}; 
         end
     end
append(d,table);
     
p = Paragraph('Separate Borders');
append(d,p);
table = Table(magicArray);
table.Style = {Border('solid'),BorderCollapse('off')};
     for r = 1:5
         for c = 1:5
             table.entry(r,c).Style = {Border('solid')}; 
         end
     end
append(d,table);
     
close(d);
rptview(d.OutputPath,doctype);

Version History

Introduced in R2014b