Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / ColumnHeader Class / DefaultStyleName Property
Example


In This Topic
    DefaultStyleName Property (ColumnHeader)
    In This Topic
    Gets or sets the name of the default style for the column header.
    Syntax
    'Declaration
     
    Public Property DefaultStyleName As String
    'Usage
     
    Dim instance As ColumnHeader
    Dim value As String
     
    instance.DefaultStyleName = value
     
    value = instance.DefaultStyleName
    public string DefaultStyleName {get; set;}

    Property Value

    String containing the name of the default style for the header
    Exceptions
    ExceptionDescription
    Specified style (NamedStyle object) could not be found in the collection
    Example
    This example sets the background color of all the columns in the column header, based on the DefaultStyleName.
    FarPoint.Win.Spread.ColumnHeader ch;
    FarPoint.Win.Spread.NamedStyle style = new FarPoint.Win.Spread.NamedStyle("ColumnHeader");
    ch = fpSpread1.ActiveSheet.ColumnHeader;
    ch.RowCount = 3;
    style.BackColor = Color.Teal;
    fpSpread1.NamedStyles.Add(style);
    ch.DefaultStyleName = "ColumnHeader";
    Dim ch As FarPoint.Win.Spread.ColumnHeader
    Dim style As New FarPoint.Win.Spread.NamedStyle("ColumnHeader")
    ch = fpSpread1.ActiveSheet.ColumnHeader
    ch.RowCount = 3
    style.BackColor = Color.Teal
    fpSpread1.NamedStyles.Add(style)
    ch.DefaultStyleName = "ColumnHeader"
    See Also