Spread Windows Forms 10.0 Product Documentation
ConditionalFormattingIconValue Constructor(Object,ConditionalFormattingValueType,Boolean,CustomImageInfo)
Example 


The value.
The type. Note: ConditionalFormattingIconValue accepts only Number, Percent, Percentile, and Formula values of ConditionalFormattingValueType.
if set to true is greater or equal.
The custom image infomation.
Initializes a new instance of the ConditionalFormattingIconValue class.
Syntax
'Declaration
 
Public Function New( _
   ByVal value As Object, _
   ByVal type As ConditionalFormattingValueType, _
   ByVal isGreaterOrEquals As Boolean, _
   ByVal customInfo As CustomImageInfo _
)
'Usage
 
Dim value As Object
Dim type As ConditionalFormattingValueType
Dim isGreaterOrEquals As Boolean
Dim customInfo As CustomImageInfo
 
Dim instance As New ConditionalFormattingIconValue(value, type, isGreaterOrEquals, customInfo)
public ConditionalFormattingIconValue( 
   object value,
   ConditionalFormattingValueType type,
   bool isGreaterOrEquals,
   CustomImageInfo customInfo
)

Parameters

value
The value.
type
The type. Note: ConditionalFormattingIconValue accepts only Number, Percent, Percentile, and Formula values of ConditionalFormattingValueType.
isGreaterOrEquals
if set to true is greater or equal.
customInfo
The custom image infomation.
Remarks
If you set the isGreaterOrEquals parameter to false, this means greater than (not less than) for this parameter. Specify the custom icons in order from largest value to smallest.
Example
This example uses custom icons in the rule.
System.Drawing.Icon resource1 = new System.Drawing.Icon("C:\\SpreadWin7\\SpWin7CSharp\\fpicon.ico");
System.Drawing.Icon resource2 = new System.Drawing.Icon("C:\\SpreadWin7\\SpWin7CSharp\\cat.ico");
fpSpread1.CustomIconContainer.AddIcon("fpicon", resource1);
fpSpread1.CustomIconContainer.AddIcon("cat", resource2);
FarPoint.Win.Spread.IconSetConditionalFormattingRule iconRule = new FarPoint.Win.Spread.IconSetConditionalFormattingRule(FarPoint.Win.Spread.ConditionalFormattingIconSetStyle.Custom);
iconRule.IconRuleSet.Add(new FarPoint.Win.Spread.ConditionalFormattingIconValue(0, FarPoint.Win.Spread.ConditionalFormattingValueType.Number, false, new FarPoint.Win.Spread.CustomImageInfo("fpicon")));
iconRule.IconRuleSet.Add(new FarPoint.Win.Spread.ConditionalFormattingIconValue(1, FarPoint.Win.Spread.ConditionalFormattingValueType.Number, false, new FarPoint.Win.Spread.CustomImageInfo("cat")));
fpSpread1_Sheet1.SetValue(0, 0, 0);
fpSpread1_Sheet1.SetValue(1, 0, 1);
fpSpread1_Sheet1.SetValue(2, 0, 2);
fpSpread1_Sheet1.SetConditionalFormatting(0, 0, 3, 1, new FarPoint.Win.Spread.IConditionalFormattingRule[] { iconRule });
Dim resource1 As New System.Drawing.Icon("C:\SpreadWin7\SpWin7CSharp\fpicon.ico")
Dim resource2 As New System.Drawing.Icon("C:\SpreadWin7\SpWin7CSharp\cat.ico")
FpSpread1.CustomIconContainer.AddIcon("fpicon", resource1)
FpSpread1.CustomIconContainer.AddIcon("cat", resource2)
Dim iconRule As New FarPoint.Win.Spread.IconSetConditionalFormattingRule(FarPoint.Win.Spread.ConditionalFormattingIconSetStyle.Custom)
iconRule.IconRuleSet.Add(New FarPoint.Win.Spread.ConditionalFormattingIconValue(0, FarPoint.Win.Spread.ConditionalFormattingValueType.Number, False, New FarPoint.Win.Spread.CustomImageInfo("fpicon")))
iconRule.IconRuleSet.Add(New FarPoint.Win.Spread.ConditionalFormattingIconValue(1, FarPoint.Win.Spread.ConditionalFormattingValueType.Number, False, New FarPoint.Win.Spread.CustomImageInfo("cat")))
FpSpread1_Sheet1.SetValue(0, 0, 0)
FpSpread1_Sheet1.SetValue(1, 0, 1)
FpSpread1_Sheet1.SetValue(2, 0, 2)
FpSpread1_Sheet1.SetConditionalFormatting(0, 0, 3, 1, New FarPoint.Win.Spread.IConditionalFormattingRule() {iconRule})
Requirements

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

See Also

Reference

ConditionalFormattingIconValue Class
ConditionalFormattingIconValue Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.