Spread for ASP.NET 8.0 Product Documentation
TwoColorScaleConditionalFormattingRule Constructor(Color,Color)
Example 


Color of the minimum value.
Color of the maximum value.
Initializes a new instance of the TwoColorScaleConditionalFormattingRule class.
Syntax
'Declaration
 
Public Function New( _
   ByVal minColor As Color, _
   ByVal maxColor As Color _
)
'Usage
 
Dim minColor As Color
Dim maxColor As Color
 
Dim instance As New TwoColorScaleConditionalFormattingRule(minColor, maxColor)
public TwoColorScaleConditionalFormattingRule( 
   Color minColor,
   Color maxColor
)

Parameters

minColor
Color of the minimum value.
maxColor
Color of the maximum value.
Example
This example creates a two color scale rule.
protected void Page_Load(object sender, EventArgs e)
        {
            if (this.IsPostBack) return;
            FpSpread1.Sheets[0].Cells[0, 0].Value = 3;
            FpSpread1.Sheets[0].Cells[1, 0].Value = 2;
            FpSpread1.Sheets[0].Cells[1, 1].Value = 10;
            FpSpread1.Sheets[0].Cells[0, 2].Value = 1;
            FarPoint.Web.Spread.TwoColorScaleConditionalFormattingRule two = new FarPoint.Web.Spread.TwoColorScaleConditionalFormattingRule(System.Drawing.Color.Red, System.Drawing.Color.Blue);
            FpSpread1.ActiveSheetView.SetConditionalFormatting(0, 0, 2, 2, two);
        }
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (IsPostBack) Then
            Return
        End If

        FpSpread1.Sheets(0).Cells(0, 0).Value = 3
        FpSpread1.Sheets(0).Cells(1, 0).Value = 2
        FpSpread1.Sheets(0).Cells(1, 1).Value = 10
        FpSpread1.Sheets(0).Cells(0, 2).Value = 1
        Dim two As New FarPoint.Web.Spread.TwoColorScaleConditionalFormattingRule(System.Drawing.Color.Red, System.Drawing.Color.Blue)
        FpSpread1.ActiveSheetView.SetConditionalFormatting(0, 0, 2, 2, two)
    End Sub
Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

TwoColorScaleConditionalFormattingRule Class
TwoColorScaleConditionalFormattingRule Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.