Style
Style
概述
Style 是 Aspose.Cells FOSS for C++ 中的一个类。
表示一个可变的单元格样式外观,可应用于一个或多个单元格。
此类提供了 46 个用于在 C++ 程序中处理 Style 对象的方法。可用的方法包括:Borders、Clone、Color、FillPattern、Font、FromCore、GetBackgroundColor、GetBorders、GetCustom、GetFont、GetForegroundColor、GetHorizontalAlignment,以及另外 33 个方法。安装 Aspose.Cells FOSS for C++ 包后,所有公共成员对任何 C++ 应用程序均可访问。访问器方法:Borders、Color、FillPattern、Font、HorizontalAlignmentType、VerticalAlignmentType。
访问器方法
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
Font | Font | 读取 | 获取字体。 |
Borders | Borders | 读取 | 获取边框。 |
FillPattern | FillPattern | 读取 | 获取填充模式。 |
Color | Color | 读取 | 获取颜色。 |
HorizontalAlignmentType | HorizontalAlignmentType | 读取 | 获取水平对齐类型。 |
VerticalAlignmentType | VerticalAlignmentType | 读取 | 获取垂直对齐类型。 |
方法
| 签名 | 描述 |
|---|---|
Font() → Font | 获取字体设置。 |
Borders() → Borders | 获取边框设置。 |
FillPattern() → FillPattern | 获取填充模式。 |
Color() → Color | 获取填充前景颜色。 |
Color() → Color | 获取填充背景颜色。 |
HorizontalAlignmentType() → HorizontalAlignmentType | 获取水平对齐方式。 |
VerticalAlignmentType() → VerticalAlignmentType | 获取垂直对齐方式。 |
GetFont() → Font | 获取字体设置。 |
SetFont(value: Font) | 设置字体设置。 |
GetBorders() → Borders | 获取边框设置。 |
SetBorders(value: Borders) | 设置边框设置。 |
GetPattern() → FillPattern | 获取填充模式。 |
SetPattern(value: FillPattern) | 设置填充图案。 |
GetForegroundColor() → Color | 获取填充前景颜色。 |
SetForegroundColor(value: Color) | 设置填充前景色。 |
GetBackgroundColor() → Color | 获取填充背景颜色。 |
SetBackgroundColor(value: Color) | 设置填充背景颜色。 |
GetNumber() → int | 获取数值格式标识符。 |
SetNumber(value: int) | 设置数值格式标识符。 |
GetCustom() → std::string | 获取自定义数字格式代码。 |
SetCustom(value: std::string) | 设置自定义数字格式代码。 |
GetNumberFormat() → std::string | 获取已解析的数字格式字符串。 |
SetNumberFormat(value: std::string) | 设置数字格式。接受内置格式字符串或自定义格式代码。 |
GetHorizontalAlignment() → HorizontalAlignmentType | 获取水平对齐方式。 |
SetHorizontalAlignment(value: HorizontalAlignmentType) | 设置水平对齐方式。 |
GetVerticalAlignment() → VerticalAlignmentType | 获取垂直对齐方式。 |
SetVerticalAlignment(value: VerticalAlignmentType) | 设置垂直对齐方式。 |
GetWrapText() → bool | 获取单元格内文本是否换行。 |
SetWrapText(value: bool) | 设置文本是否在单元格内换行。 |
GetIndentLevel() → int | 获取缩进级别。 |
SetIndentLevel(value: int) | 设置缩进级别。必须在 0 到 250 之间。 |
GetTextRotation() → int | 获取文本旋转。 |
SetTextRotation(value: int) | 设置文本旋转。必须在 0 到 180 之间,或使用 255 表示垂直文本。 |
GetShrinkToFit() → bool | 获取单元格内容是否收缩以适应。 |
SetShrinkToFit(value: bool) | 设置单元格内容是否收缩以适应。 |
GetReadingOrder() → int | 获取阅读顺序。 |
SetReadingOrder(value: int) | 设置阅读顺序。必须为 0、1 或 2。 |
GetRelativeIndent() → int | 获取相对缩进。 |
SetRelativeIndent(value: int) | 设置相对缩进。 |
GetIsLocked() → bool | 获取工作表保护启用时单元格是否被锁定。 |
SetIsLocked(value: bool) | 设置工作表保护启用时单元格是否被锁定。 |
GetIsHidden() → bool | 获取在工作表保护启用时单元格公式是否隐藏。 |
SetIsHidden(value: bool) | 设置在工作表保护启用时单元格公式是否隐藏。 |
Clone() → Style | 创建当前样式的副本。已克隆的样式。 |
ToCore() → Core::StyleValue | 将此样式转换为核心 StyleValue。 |
FromCore(value: Core::StyleValue) → Style | 从 Core StyleValue 创建样式。 |