## GridCell.SetFont method

Legt die Schriftart für die Zelle fest. Um die Leistung zu verbessern, implementieren Sie die Methode „SetFont“, implementieren Sie die Eigenschaft „Font“ nicht.

```csharp
public void SetFont(Font font)
```

| Parameter | Typ | Beschreibung |
| --- | --- | --- |
| font | Font | Schriftart einzustellen. |

### Beispiele

```csharp
[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

* class [GridCell](../../gridcell)
* namensraum [Aspose.Cells.GridDesktop.Data](../../gridcell)
* Montage [Aspose.Cells.GridDesktop](../../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.GridDesktop.dll -->
