TSOffice/TOfficeObj.md

145 lines
6.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TOfficeObj 说明文档
## TStyle
- **NumberFormat** : `class` : [**TNumFmts**](#tnumfmts) 数字样式
- **Alignment** : `class` : [**TAligment**](#taligment) 对齐样式
- **Font** : `class` : [**TFont**](#tfont) 字体样式
- **Border** : `class` : [**TBorder**](#tborders) 边框样式
- **Fill** : `class` : [**TFills**](#tfills) 填充样式
- **Protection** : `class` : [**TProtection**](#tprotection) 保护样式
## TNumFmts
- **FormatCode** : `string`
## TAligment
- **Horizontal** : `string` 水平对齐
- nil默认靠右
- "center" : 居中
- "left" : 靠左
- "fill" : 填充
- "justify" : 两端对齐
- "distributed" : 分散对齐
- "centerContinuous" : 跨列居中
- **Vertical** : `string` 垂直对齐
- nil默认靠下
- "center" : 居中
- "top" : 靠上
- "justify" : 两端对齐
- "distributed" : 分散对齐
- **WrapText** : `boolean` 是否自动换行,默认不换行
- **ReadingOrder** : `string` 文字方向
- nil默认根据内容
- "1" : 总是从左到右
- "2" : 总是从右到左
## TFont
- **Name** : `string`,字体名称
- **Size** : `float` 字体大小
- **Bold** : `boolean` 是否加粗,默认不加粗
- **Italic** : `boolean` 是否倾斜,默认不倾斜
- **Charset** : `string` 字符集,可不设置
- **Strikethrough** : `boolean` 是否启用删除线,默认不启用
- **Script** : `string` 上下标
- "subscript" : 下标
- "superscript" : 上标
- _颜色只能设置以下一种属性_
- **Color** : `string` RGB 颜色,如"FFA020F0"
- **ThemeColor** : `int` 主题颜色
- **Underline** : `string` 下划线,默认无
- "double" : 双下划线
- "singleAccounting" : 会计单下划线
- "doubleAccounting" : 会计双下划线
```md
未使用
- **FontStyle** : `string`
- **OutlineFont** : `string`
- **shadow** : `string`
- **Background** : `string`
- **TintAndShade** :
- **rFont** :
- **ThemeFont** :
- **ColorIndex** : `string`
```
## TBorders
- **Left** : `class` : [**TBorder**](#tborder) 左边框
- **Right** : `class` : [**TBorder**](#tborder) 右边框
- **Top** : `class` : [**TBorder**](#tborder) 上边框
- **Bottom** : `class` : [**TBorder**](#tborder) 下边框
- **DiagonalUp** : `boolean` 斜上对角线
- **DiagonalDown** : `boolean` 斜下对角线
- **Diagonal** : `class` : [**TBorder**](#tborder) 对角线,设置 **DiagonalUp****DiagonalDown** 时有效
## TBorder
- **LineStyle** : `string` 线型
- "hair"
- "dotted"
- "dashDotDot"
- "dashDot"
- "dashed"
- "thin"
- "slantDashDot"
- "mediumDashDodDot"
- "mediumDashDot"
- "mediumDashed"
- "medium"
- "thick"
- "double"
- _颜色只能设置以下一种属性_
- **Color** : `string` RGB 颜色,如"FFA020F0"
- **ThemeColor** : `int` 主题颜色
## TFills
只能设置一种填充方式
- **Pattern** : `class` : [**TPattern**](#tpattern) 图案填充
- **Gradient** : `class` : [**TGradient**](#tgradient) 颜色渐变填充
## TPattern
- **PatternType** : `string` 图案样式
- _颜色前景色只能设置以下一种属性_
- **ForegroundColor** : `string` RGB 颜色
- **ForegroundThemeColor** : `int` 主题颜色
- _颜色背景色只能设置以下一种属性_
- **BackgroundColor** : `string` RGB 颜色
- **BackgroundThemeColor** : `int` 主题颜色
## TGradient
- _颜色 1渐变的颜色 1但每个颜色只能设置以下一种属性_
- **Color1** : `string` RGB 颜色
- **ThemeColor1** : `int` 主题颜色
- _颜色 2渐变的颜色 2但每个颜色只能设置以下一种属性_
- **Color2** : `string` RGB 颜色
- **ThemeColor2** : `int` 主题颜色
- **Shading** : `int` 底纹样式
| <div style="width: 20pt">取值</div> | 样式 | 取值 | 样式 |
| ----------------------------------- | -------------------------------------------------------------------------------- | ---- | ------------------------------------------------- |
| 0 | 水平渐变,颜色 1 从上到下渐变到颜色 2 | 1 | 水平渐变,颜色 2 从上到下渐变到颜色 1 |
| 2 | 水平渐变,三层颜色,颜色 1 从上渐变到中间颜色 2再从颜色 2 渐变到底部颜色 1 |
| 3 | 垂直渐变,颜色 1 从左到右渐变到颜色 2 | 4 | 垂直渐变,颜色 2 从右到左渐变到颜色 1 |
| 5 | 垂直渐变,三层颜色,颜色 1 从左渐变到中间颜色 2再从颜色 2 渐变到右边颜色 1 |
| 6 | 斜上渐变,颜色 1 左上渐变到右下颜色 2 | 7 | 斜上渐变,颜色 2 左上渐变到右下颜色 1 |
| 8 | 斜上渐变,三层颜色,颜色 1 从左上渐变到对角线颜色 2再从颜色 2 渐变到右下颜色 1 |
| 9 | 斜下渐变,颜色 1 右上渐变到左下颜色 2 | 10 | 斜下渐变,颜色 2 左上渐变到右下颜色 1 |
| 11 | 斜下渐变,三层颜色,颜色 1 从左上渐变到对角线颜色 2再从颜色 2 渐变到右下颜色 1 |
| 12 | 角部辐射渐变,颜色 1 左上角辐射渐变到右下角 | 13 | 角部辐射渐变,颜色 1 右上角辐射渐变到左下角颜色 2 |
| 14 | 角部辐射渐变,颜色 1 左下角辐射渐变到右上角 | 15 | 角部辐射渐变,颜色 1 右下角辐射渐变到左上角颜色 2 |
| 16 | 中心辐射渐变,颜色 1 从中心向四周辐射到颜色 2 |
## TProtection
- **Lock** : `boolean` 是否锁定
- **Hide** : `boolean` 是否隐藏