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


In This Topic
    BackgroundStyle Property (ButtonCellType)
    In This Topic
    Gets or sets how the background is rendered.
    Syntax
    'Declaration
     
    Public Property BackgroundStyle As BackStyle
    'Usage
     
    Dim instance As ButtonCellType
    Dim value As BackStyle
     
    instance.BackgroundStyle = value
     
    value = instance.BackgroundStyle
    public BackStyle BackgroundStyle {get; set;}
    Remarks
    Set the UseVisualStyleBackColor property to false to see different button colors.
    Example
    This example sets the button colors.
    FarPoint.Win.Spread.CellType.ButtonCellType btn = new
    FarPoint.Win.Spread.CellType.ButtonCellType();
    btn.BackgroundStyle = FarPoint.Win.BackStyle.Gradient;
    btn.ButtonColor = Color.Yellow;
    btn.ButtonColor2 = Color.Orange;
    btn.GradientMode = Drawing2D.LinearGradientMode.ForwardDiagonal;
    fpSpread1.ActiveSheet.Cells[0, 0].CellType = btn;
    Dim btn As New FarPoint.Win.Spread.CellType.ButtonCellType
    btn.BackgroundStyle = FarPoint.Win.BackStyle.Gradient
    btn.ButtonColor = Color.Yellow
    btn.ButtonColor2 = Color.Orange
    btn.GradientMode = Drawing2D.LinearGradientMode.ForwardDiagonal
    
    fpSpread1.ActiveSheet.Cells(0, 0).CellType = btn
    See Also