SetStyle
GridCell.SetStyle method
为单元格设置样式。 为提高性能,实现“SetStyle”方法, 不实现“样式”属性。
public void SetStyle(Style value)
范围 | 类型 | 描述 |
---|---|---|
style | Style | 要设置的样式。 |
例子
[C#]
Style style = sheet.GetCell(0, 0).GetStyle();
style.CellLocked = true;
style.VAlignment = VerticalAlignmentType.Top;
...
sheet.GetCell(0, 0).SetStyle(style);
[Visual Basic]
Dim style As Style = sheet.GetCell(0,0).GetStyle()
style.CellLocked = True
style.VAlignment = VerticalAlignmentType.Top
...
sheet.GetCell(0, 0).SetStyle(style)
也可以看看
- class Style
- class GridCell
- 命名空间 Aspose.Cells.GridDesktop.Data
- 部件 Aspose.Cells.GridDesktop