Spread Windows Forms 11.0 Product Documentation
GradientMode Property (ButtonCellType)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > ButtonCellType Class : GradientMode Property
Gets or sets the drawing style of a gradient button.
Syntax
'Declaration
 
Public Property GradientMode As LinearGradientMode
'Usage
 
Dim instance As ButtonCellType
Dim value As LinearGradientMode
 
instance.GradientMode = value
 
value = instance.GradientMode
public LinearGradientMode GradientMode {get; set;}

Property Value

LinearGradientMode setting that specifies the mode of the gradient
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