GetFontColor

GridCell.GetFontColor method

Ruft die Schriftfarbe der Zelle ab. Wenn Sie die Farbe ändern, sollten Sie die Methode “SetFontColor” aufrufen, um die Schriftfarbe auf die Zelle einzustellen.

public Color GetFontColor()

Rückgabewert

Schriftfarbe der Zelle zurückgeben.

Beispiele

[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)

Siehe auch