SetFont
GridCell.SetFont method
Anger teckensnitt till cell. För att förbättra prestanda, implementera “SetFont”-metoden, implementera inte egenskapen “Font”.
public void SetFont(Font font)
Parameter | Typ | Beskrivning |
---|---|---|
font | Font | teckensnitt som ska ställas in. |
Exempel
[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)
Se även
- class GridCell
- namnutrymme Aspose.Cells.GridDesktop.Data
- hopsättning Aspose.Cells.GridDesktop