Spread Windows Forms 7.0 Product Documentation
ResetFont Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > AlternatingRow Class : ResetFont Method


Glossary Item Box

Resets the font for this row and makes this row inherit the font from the default row.

Syntax

Visual Basic (Declaration) 
Public Sub ResetFont() 
Visual Basic (Usage)Copy Code
Dim instance As AlternatingRow
 
instance.ResetFont()
C# 
public void ResetFont()

Example

This example shows the use of this method (as well as other resets) to reset the alternating row properties.
C#Copy Code
fpSpread1.ActiveSheet.AlternatingRows[0].BackColor = Color.LightBlue;
fpSpread1.ActiveSheet.AlternatingRows[0].Border = new FarPoint.Win.LineBorder(Color.DarkBlue);
fpSpread1.ActiveSheet.AlternatingRows[0].CellType = new FarPoint.Win.Spread.CellType.GeneralCellType();
fpSpread1.ActiveSheet.AlternatingRows[0].Font = new Font("Comic Sans MS", 10);
fpSpread1.ActiveSheet.AlternatingRows[0].ForeColor = Color.Red;
fpSpread1.ActiveSheet.AlternatingRows[0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
fpSpread1.ActiveSheet.AlternatingRows[0].Locked = false;
fpSpread1.ActiveSheet.AlternatingRows[0].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Topn

private void button1Click(object sender, System.EventArgs e)
{
     DialogResult dlg = new DialogResult();
     dlg = MessageBox.Show("Reset the AlternatingRow??", "Reset", MessageBoxButtons.OKCancel);
     if (dlg == DialogResult.OK)
     {
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetBackColor();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetBorder();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetCellType();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetFont();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetForeColor();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetHorizontalAlignment();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetLocked();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetVerticalAlignment();
     }
}
Visual BasicCopy Code
FpSpread1.ActiveSheet.AlternatingRows(0).BackColor = Color.LightBlue
FpSpread1.ActiveSheet.AlternatingRows(0).Border = New FarPoint.Win.LineBorder(Color.DarkBlue)
FpSpread1.ActiveSheet.AlternatingRows(0).CellType = New FarPoint.Win.Spread.CellType.GeneralCellType
FpSpread1.ActiveSheet.AlternatingRows(0).Font = New Font("Comic Sans MS", 10)
FpSpread1.ActiveSheet.AlternatingRows(0).ForeColor = Color.Red
FpSpread1.ActiveSheet.AlternatingRows(0).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right
FpSpread1.ActiveSheet.AlternatingRows(0).Locked = False
FpSpread1.ActiveSheet.AlternatingRows(0).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top

Private Sub Button1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
     Dim dlg As New DialogResult
     dlg = MessageBox.Show("Reset the AlternatingRow??", "Reset", MessageBoxButtons.OKCancel)
     If dlg = DialogResult.OK Then
          FpSpread1.ActiveSheet.AlternatingRows(0).ResetBackColor()
          FpSpread1.ActiveSheet.AlternatingRows(0).ResetBorder()
          FpSpread1.ActiveSheet.AlternatingRows(0).ResetCellType()
          FpSpread1.ActiveSheet.AlternatingRows(0).ResetFont()
          FpSpread1.ActiveSheet.AlternatingRows(0).ResetForeColor()
          FpSpread1.ActiveSheet.AlternatingRows(0).ResetHorizontalAlignment()
          FpSpread1.ActiveSheet.AlternatingRows(0).ResetLocked()
          FpSpread1.ActiveSheet.AlternatingRows(0).ResetVerticalAlignment()
     End If
End Sub

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.