Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread.CellType Namespace / EnhancedColumnHeaderRenderer Class / SelectedBackgroundColor Property
Example


In This Topic
    SelectedBackgroundColor Property (EnhancedColumnHeaderRenderer)
    In This Topic
    Gets or sets the color of the selected background.
    Syntax
    'Declaration
     
    Public Property SelectedBackgroundColor As Color
    'Usage
     
    Dim instance As EnhancedColumnHeaderRenderer
    Dim value As Color
     
    instance.SelectedBackgroundColor = value
     
    value = instance.SelectedBackgroundColor
    public Color SelectedBackgroundColor {get; set;}

    Property Value

    Color of the background when the cell is selected
    Example
    This example sets the color scheme for the renderer of the column header.
    FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer ec = new FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer();
    ec.ActiveBackgroundColor = Color.Azure;
    ec.SelectedActiveBackgroundColor = Color.Bisque;
    ec.SelectedBackgroundColor = Color.Crimson;
    ec.SelectedGridLineColor = Color.Red;
    ec.NormalBackgroundColor = Color.Beige;
    ec.NormalGridLineColor = Color.DarkOrange;
    fpSpread1.ActiveSheet.ColumnHeader.DefaultStyle.Renderer = ec;
    
    Dim ec As New FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer
    ec.ActiveBackgroundColor = Color.Azure
    ec.SelectedActiveBackgroundColor = Color.Bisque
    ec.SelectedBackgroundColor = Color.Crimson
    ec.SelectedGridLineColor = Color.Red
    ec.NormalBackgroundColor = Color.Beige
    ec.NormalGridLineColor = Color.DarkOrange
    FpSpread1.ActiveSheet.ColumnHeader.DefaultStyle.Renderer = ec
    
    See Also