SetFontColor

GridCell.SetFontColor method

为单元格设置字体颜色。 为了提高性能,实现“SetFontColor”方法, 不实现“FontColor”属性。

public void SetFontColor(Color color)
范围类型描述
colorColor要设置的字体颜色。

例子

[C#]
GridCell cell = gridDesktop1.GetActiveWorksheet().Cells[0, 0];
Font font = new Font("Courier New", 8, FontStyle.Italic);
cell.SetFont(font);
Color color = cell.GetFontColor();
color = Color.Black;
cell.SetFontColor(color);

[Visual Basic]
Dim cell As GridCell =  gridDesktop1.GetActiveWorksheet().Cells(0, 0) 
Dim font As Font =  New Font("Courier New",8,FontStyle.Italic) 
cell.SetFont(font)
Dim color As Color =  cell.GetFontColor() 
color = Color.Black
cell.SetFontColor(color)

也可以看看