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

In This Topic
    DarkColor Property (ButtonCellType)
    In This Topic
    Gets or sets the shadow color for the button.
    Public Property DarkColor As Color
    Dim instance As ButtonCellType
    Dim value As Color
    instance.DarkColor = value
    value = instance.DarkColor
    public Color DarkColor {get; set;}

    Property Value

    Color object containing the dark color of the button
    Set the UseVisualStyleBackColor property to false to see different button colors.
    This example sets up a cell on the first sheet as a button cell and specifies the colors for the bottom and right-side of the button (DarkColor) and the top and left sides (LightColor) and the shadow and the text. It shows how the text can be different when the button is pressed (and held) and how text can wrap to multiple lines.
    FarPoint.Win.Spread.CellType.ButtonCellType bttncell = new FarPoint.Win.Spread.CellType.ButtonCellType();
    bttncell.ButtonColor = Color.Cyan;
    bttncell.DarkColor = Color.DarkCyan;
    bttncell.LightColor = Color.AliceBlue;
    bttncell.ShadowSize = 3;
    bttncell.Text = "Click and hold...";
    bttncell.TextDown = "...you can see how words go to multiple lines. Now let go.";
    bttncell.TextColor = Color.Green;
    bttncell.WordWrap = true;
    bttncell.UseVisualStyleBackColor = false;
    fpSpread1.Sheets[0].Cells[3,2].CellType = bttncell;
    Dim bttncell As New FarPoint.Win.Spread.CellType.ButtonCellType()
    bttncell.ButtonColor = Color.Cyan
    bttncell.DarkColor = Color.DarkCyan
    bttncell.LightColor = Color.AliceBlue
    bttncell.ShadowSize = 3
    bttncell.Text = "Click and hold..."
    bttncell.TextDown = "...you can see how words go to multiple lines. Now let go."
    bttncell.TextColor = Color.Green
    bttncell.WordWrap = True
    bttncell.UseVisualStyleBackColor = False
    fpSpread1.Sheets(0).Cells(3,2).CellType = bttncell
    See Also