Spread Windows Forms 7.0 Product Documentation
UseNegativeBorderColor Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > DatabarConditionalFormattingRule Class : UseNegativeBorderColor Property


Glossary Item Box

Gets or sets a value that indicates whether the negative border color is used to paint the border for the negative value.

Syntax

Visual Basic (Declaration) 
Public Property UseNegativeBorderColor As Boolean
Visual Basic (Usage)Copy Code
Dim instance As DatabarConditionalFormattingRule
Dim value As Boolean
 
instance.UseNegativeBorderColor = value
 
value = instance.UseNegativeBorderColor
C# 
public bool UseNegativeBorderColor {get; set;}

Property Value

true if the negative border color is used to paint the border for the negative value; otherwise, false.

Example

This example sets the UseNegativeBorderColor property.
C#Copy Code
fpSpread1.Sheets[0].Cells[0, 0].Value = 2;
fpSpread1.Sheets[0].Cells[1, 0].Value = -1;
fpSpread1.Sheets[0].Cells[3, 0].Value = 3;
FarPoint.Win.Spread.DatabarConditionalFormattingRule dataBarRule = new FarPoint.Win.Spread.DatabarConditionalFormattingRule();
dataBarRule.AxisPosition = FarPoint.Win.Spread.DataBarAxisPosition.Automatic;
dataBarRule.BorderColor = Color.Blue;
dataBarRule.NegativeFillColor = Color.Red;
dataBarRule.Gradient = true;
dataBarRule.Maximum = new FarPoint.Win.Spread.ConditionalFormattingValue(FarPoint.Win.Spread.ConditionalFormattingValueType.AutoMax);
dataBarRule.Minimum = new FarPoint.Win.Spread.ConditionalFormattingValue(FarPoint.Win.Spread.ConditionalFormattingValueType.AutoMin);
dataBarRule.UseNegativeFillColor = true;
dataBarRule.UseNegativeBorderColor = false;

FarPoint.Win.Spread.ConditionalFormatting cf = new FarPoint.Win.Spread.ConditionalFormatting(new FarPoint.Win.Spread.Model.CellRange(0, 0, 4, 1));
cf.Add(dataBarRule);
fpSpread1.ActiveSheet.Models.ConditionalFormatting.Add(cf);
VB.NETCopy Code
fpSpread1.Sheets(0).Cells(0, 0).Value = 2
fpSpread1.Sheets(0).Cells(1, 0).Value = -1
fpSpread1.Sheets(0).Cells(3, 0).Value = 3
Dim dataBarRule As New FarPoint.Win.Spread.DatabarConditionalFormattingRule()
dataBarRule.AxisPosition = FarPoint.Win.Spread.DataBarAxisPosition.Automatic
dataBarRule.BorderColor = Color.Blue
dataBarRule.NegativeFillColor = Color.Red
dataBarRule.Gradient = True
dataBarRule.Maximum = New FarPoint.Win.Spread.ConditionalFormattingValue(FarPoint.Win.Spread.ConditionalFormattingValueType.AutoMax)
dataBarRule.Minimum = New FarPoint.Win.Spread.ConditionalFormattingValue(FarPoint.Win.Spread.ConditionalFormattingValueType.AutoMin)
dataBarRule.UseNegativeFillColor = True
dataBarRule.UseNegativeBorderColor = False

Dim cf As New FarPoint.Win.Spread.ConditionalFormatting(New FarPoint.Win.Spread.Model.CellRange(0, 0, 4, 1))
cf.Add(dataBarRule)
fpSpread1.ActiveSheet.Models.ConditionalFormatting.Add(cf)

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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