Main Content

本页采用了机器翻译。点击此处可查看英文原文。

mlreportgen.dom.RowSep 类

命名空间: mlreportgen.dom

在表行之间绘制线条

描述

在表行之间画线(分隔符)。

mlreportgen.dom.RowSep 类是一个 handle 类。

创建对象

描述

rowSepObj = RowSep 创建未指定的行分隔符。

rowSepObj = RowSep(style) 创建指定样式的行分隔符。

rowSepObj = RowSep(style,color) 创建具有指定样式和颜色的行分隔符。

示例

rowSepObj = RowSep(style,color,width) 创建具有指定样式、颜色和宽度的行分隔符。

输入参量

全部展开

表行分隔符的线条样式,指定为以下值之一。

支持 Word支持 HTML 和 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'

表行分隔符的颜色,指定为颜色,例如 'red' 或十六进制 RGB 值,例如 '#0000ff'

表行分隔符的宽度,形式为 valueUnits,其中 Units 是单位的缩写。有效的缩写是:

  • "px" - 像素

  • "cm" - 厘米

  • "in" - 英寸

  • "mm" - 毫米

  • "pc" - 派卡

  • "pt" - 磅

属性

全部展开

文档元素颜色由 CSS 颜色名称(请参阅 https://www.w3.org/wiki/CSS/Properties/color/keywords)或 #RRGGBB 形式的十六进制 RGB(真彩色)值组成,指定为字符向量或字符串标量。

注意

设置 Color 属性会将相应的 mlreportgen.dom.Color 格式对象添加到 Style 属性。将 Color 属性设置为空值将删除该对象。

示例: "blue"

示例: "#0000ff"

属性:

NonCopyable
true

数据类型: char | string

表行分隔符的宽度,形式为 valueUnits,其中 Units 是单位的缩写。有效的缩写是:

  • "px" - 像素

  • "cm" - 厘米

  • "in" - 英寸

  • "mm" - 毫米

  • "pc" - 派卡

  • "pt" - 磅

行分隔符的线条样式。请参阅 style 输入参量的描述,了解可能的值列表。

mlreportgen.dom.RowSep 对象的标签,指定为字符向量或字符串标量。DOM API 在创建此对象的过程中生成一个会话唯一标签。生成的标签形式为 CLASS:ID,其中 CLASS 是对象类,ID 是对象的 Id 属性的值。指定您自己的标签值,以帮助您确定在文档生成过程中出现问题时要查找的位置。

属性:

NonCopyable
true

数据类型: char | string

mlreportgen.dom.RowSep 对象的对象标识符,指定为字符向量或字符串标量。DOM API 在创建文档元素对象时会生成一个会话唯一标识符。您可以为 Id 指定自己的值。

属性:

NonCopyable
true

数据类型: char | string

示例

全部折叠

将行分隔符定义为表的 Style 属性定义的一部分。

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

t = Table(magic(5));
t.Style = {Border('inset','crimson','6pt'), ...
   ColSep('double','DarkGreen','3pt'), ...
   RowSep('double','Gold','3pt'), ...
   Width('50%')};

t.TableEntriesInnerMargin = '6pt';
t.TableEntriesHAlign = 'center';
t.TableEntriesVAlign = 'middle';
append(d,t);

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

版本历史记录

在 R2014b 中推出