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

Package: mlreportgen.dom
Superclasses:

Draw lines between table columns

Description

Draw lines between table columns.

Construction

colSepObj = ColSep() creates unspecified column separators.

colSepObj = ColSep(style) creates a column separator of the specified style.

colSepObj = ColSep(style,color) creates a column separator having the specified style and color.

colSepObj = ColSep(style,color,width) creates a column separator having the specified style, color, and width.

Input Arguments

expand all

Style of the table column separator, specified as one of these values.

ValueApplies To
DOCXHTML and PDF
'dashed'
'dashdotstroked' 
'dashsmallgap' 
'dotted'
'dotdash' 
'dotdotdash' 
'double'
'doublewave' 
'inset'
'none'
'outset'
'single' 
'solid' 
'thick' 
'thickthinlargegap' 
'thickthinmediumgap' 
'thickthinsmallgap' 
'thinthicklargegap' 
'thinthickmediumgap' 
'thinthicksmallgap' 
'thinthickthinlargegap' 
'thinthickthinmediumgap' 
'thinthickthinsmallgap' 
'threedemboss' 
'threedengrave' 
'triple' 
'wave' 

You can specify:

Color of the table column separator, in the format valueUnits. Units is an abbreviation for the units. Valid abbreviations are:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Output Arguments

expand all

Column separator definition, represented by an mlreportgen.dom.ColSpec object.

Properties

expand all

You can specify:

ID for this document element, specified as a character vector. The DOM generates a session-unique ID when it creates the document element. You can specify your own ID.

Array of format objects (such as Bold objects) that specify the format for the separator.

This property overrides corresponding formats defined by the style sheet style specified by the StyleName property.

Tag for document element, specified as a character vector.

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

For example, to make it easier to identify where an issue occurred during document generation, you can specify your own tag value.

Separator width as a percentage, for example, '100%', or a number of units of measurement in the form valueUnits. Units is an abbreviation for the units. Use one of these abbreviations for the units of a width.

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Data Types: char

Examples

expand all

This example creates table and sets the border, column separator, and row separator styles. The TableEntriesStyle property formats the table entries.

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

t.Style = { ...
    RowHeight('0.75in'), ...
    Border('solid','Green','6pt'), ...
    ColSep('double','DarkGreen','3pt'), ...
    RowSep('single','DarkGreen')};

t.TableEntriesStyle = { ...
    Width('0.75in'), ...
    InnerMargin('0'), ...
    OuterMargin('0'), ...
    HAlign('center'), ...
    VAlign('middle') };

append(d,t);
close(d);
rptview(d.OutputPath);
Was this topic helpful?