Main Content

mlreportgen.dom.HorizontalRule class

Package: mlreportgen.dom

Horizontal line between report content

Description

Horizontal line to visually separate report content in a report. You can append a HorizontalRule object to these objects:

  • mlreportgen.dom.Document

  • mlreportgen.dom.DocumentPart

  • mlreportgen.dom.TableEntry

  • mlreportgen.dom.Group

  • mlreportgen.dom.Container

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

Creation

Description

example

horizontalRuleObj = HorizontalRule() creates an unspecified horizontal line.

Properties

expand all

Line style for horizontal rule, 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' 

Color of the line, specified as a character vector. You can specify:

Width of line (in an HTML report), specified in the format valueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Background color of the line, specified as a character vector. You can specify:

This property applies only to HTML reports.

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

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Format specification for the line, specified as an array of format objects.

Style sheet style for line, specified as a character vector. The name of a style must be specified in the style sheet of the document or document part to which this element is appended. The specified style defines the appearance of this element in the output document where not overridden by the formats specified by the Style property of this element.

Tag for line, 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.

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

Methods

expand all

Examples

collapse all

import mlreportgen.dom.*;
doctype = 'html';
d = Document('horizontalRule',doctype);
p1 = Paragraph('Top content');
append(d,p1);

hr = HorizontalRule();
hr.Border = 'dotted';
hr.BorderColor = 'blue';
append(d,hr);

p2 = Paragraph('Bottom content');
append(d,p2);

close(d);
rptview(d.OutputPath);

Version History

Introduced in R2015b

expand all