Spread Windows Forms 12.0 Product Documentation
Reset Method (NamedStyle)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > NamedStyle Class : Reset Method
Resets all the named style properties to their default values.
Syntax
'Declaration
 
Public Overrides Sub Reset() 
'Usage
 
Dim instance As NamedStyle
 
instance.Reset()
public override void Reset()
Example
This example resets all the properties of the style to their default values.
DialogResult dlg;
FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo();
si.BackColor = Color.Yellow;
si.Font = new Font("Comic Sans Serif", 12);
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle();
si.BackColor = Color.Yellow;
ns.CopyFrom(si);
fpSpread1.NamedStyles.Add(ns);
fpSpread1.ActiveSheet.ColumnHeader.DefaultStyle = ns;
fpSpread1.ActiveSheet.RowHeader.DefaultStyle = ns;
dlg = MessageBox.Show("Do you want to reset the named style?", "Reset", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
ns.Reset();
}
Dim dlg As DialogResult
Dim si As New FarPoint.Win.Spread.StyleInfo()
si.BackColor = Color.Yellow
si.Font = New Font("Comic Sans Serif", 12)
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleHeaders", "HeaderDefault")
ns.CopyFrom(si)
FpSpread1.NamedStyles.Add(ns)
FpSpread1.ActiveSheet.ColumnHeader.DefaultStyle = ns
FpSpread1.ActiveSheet.RowHeader.DefaultStyle = ns
dlg = MessageBox.Show("Do you want to reset the named style?", "Reset", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
ns.Reset()
End If
See Also

Reference

NamedStyle Class
NamedStyle Members