Spread Windows Forms 12.0 Product Documentation
ButtonColor2 Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > ButtonCellType Class : ButtonColor2 Property
Gets or sets the secondary color used when drawing a gradient button.
Syntax
'Declaration
 
Public Property ButtonColor2 As Color
'Usage
 
Dim instance As ButtonCellType
Dim value As Color
 
instance.ButtonColor2 = value
 
value = instance.ButtonColor2
public Color ButtonColor2 {get; set;}

Property Value

Color object containing the second color of the gradient in the button
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

Reference

ButtonCellType Class
ButtonCellType Members