Spread Windows Forms 11.0 Product Documentation
ResetName Method (NamedStyle)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > NamedStyle Class : ResetName Method
Resets the name of the style to the default (String.Empty).
Syntax
'Declaration
 
Public Overridable Sub ResetName() 
'Usage
 
Dim instance As NamedStyle
 
instance.ResetName()
public virtual void ResetName()
Example
This example resets the name of the style.
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle();
ns.Font = new Font("Comic Sans Serif", 12);
ns.Name = "StyleHeaders";
ns.Parent = "HeaderDefault";
fpSpread1.NamedStyles.Add(ns);
fpSpread1.ActiveSheet.ColumnHeader.DefaultStyle = ns;

DialogResult dlg;
dlg = MessageBox.Show("Do you want to reset the name?", "Reset", MessageBoxButtons.OKCancel);
if (dlg == DialogResult.OK)
{
    ns.ResetName();
}
Dim ns As New FarPoint.Win.Spread.NamedStyle
ns.Font = New Font("Comic Sans Serif", 12)
ns.Name = "StyleHeaders"
ns.Parent = "HeaderDefault"
FpSpread1.NamedStyles.Add(ns)
FpSpread1.ActiveSheet.ColumnHeader.DefaultStyle = ns

Dim dlg As DialogResult
dlg = MessageBox.Show("Do you want to reset the name?", "Reset", MessageBoxButtons.OKCancel)
If dlg = DialogResult.OK Then
    ns.ResetName()
End If
See Also

Reference

NamedStyle Class
NamedStyle Members