Spread Windows Forms 6.0 Product Documentation
GradientSection Constructor(Color,Int32)
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.DrawingSpace Namespace > GradientSection Class > GradientSection Constructor : GradientSection Constructor(Color,Int32)


color
Color
amount
Amount of the gradient

Glossary Item Box

Creates a new color gradient section with the specified parameters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal color As Color, _
   ByVal amount As Integer _
)
Visual Basic (Usage)Copy Code
Dim color As Color
Dim amount As Integer
 
Dim instance As New GradientSection(color, amount)
C# 
public GradientSection( 
   Color color,
   int amount
)

Parameters

color
Color
amount
Amount of the gradient

Example

This example sets the gradient for the shape on the sheet.
C#Copy Code
FarPoint.Win.Spread.DrawingSpace.GradientSection grd = new FarPoint.Win.Spread.DrawingSpace.GradientSection(Color.Empty, 50);
grd.AlphaBlend = 255;
grd.Color = Color.Red;

FarPoint.Win.Spread.DrawingSpace.RectangleShape rs = new FarPoint.Win.Spread.DrawingSpace.RectangleShape();
rs.Name = "GradientRect";

rs.Gradient.Style = FarPoint.Win.Spread.DrawingSpace.GradientStyle.RadialFromCenter;
rs.Gradient.Sections[0] = grd;

fpSpread1.ActiveSheet.AddShape(rs);
Visual BasicCopy Code
Dim grd As New FarPoint.Win.Spread.DrawingSpace.GradientSection(Color.Empty, 50)
grd.AlphaBlend = 255
grd.Color = Color.Red

Dim rs As New FarPoint.Win.Spread.DrawingSpace.RectangleShape
rs.Name = "GradientRect"

rs.Gradient.Style = FarPoint.Win.Spread.DrawingSpace.GradientStyle.RadialFromCenter
rs.Gradient.Sections(0) = grd

FpSpread1.ActiveSheet.AddShape(rs)

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.