HTML中condition属性,LastCondition 属性

此示例获取指定单元格的最后一个条件格式。FarPoint.Win.Spread.NamedStyle styleCold = new FarPoint.Win.Spread.NamedStyle();

FarPoint.Win.Spread.NamedStyle styleCool = new FarPoint.Win.Spread.NamedStyle();

FarPoint.Win.Spread.NamedStyle styleMild = new FarPoint.Win.Spread.NamedStyle();

FarPoint.Win.Spread.NamedStyle styleWarm = new FarPoint.Win.Spread.NamedStyle();

FarPoint.Win.Spread.NamedStyle styleHot = new FarPoint.Win.Spread.NamedStyle();

styleCold.BackColor = Color.Blue;

styleCold.ForeColor = Color.White;

styleCool.BackColor = Color.Cyan;

styleMild.BackColor = Color.Lime;

styleWarm.BackColor = Color.Yellow;

styleHot.BackColor = Color.Red;

fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleCold, FarPoint.Win.Spread.ComparisonOperator.LessThan, "32");

fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleCool, FarPoint.Win.Spread.ComparisonOperator.Between, "32", "55");

fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleMild, FarPoint.Win.Spread.ComparisonOperator.Between, "55", "75");

fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleWarm, FarPoint.Win.Spread.ComparisonOperator.Between, "75", "85");

fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleHot, FarPoint.Win.Spread.ComparisonOperator.GreaterThan, "85");

fpSpread1.ActiveSheet.Cells[1, 1].Value = 38;

FarPoint.Win.Spread.ConditionalFormat[]cf;

cf = fpSpread1.ActiveSheet.GetConditionalFormats(1, 1, false);

foreach (FarPoint.Win.Spread.ConditionalFormat item in cf)

{

MessageBox.Show(item.LastCondition.ToString());

}Dim styleCold As New FarPoint.Win.Spread.NamedStyle

Dim styleCool As New FarPoint.Win.Spread.NamedStyle

Dim styleMild As New FarPoint.Win.Spread.NamedStyle

Dim styleWarm As New FarPoint.Win.Spread.NamedStyle

Dim styleHot As New FarPoint.Win.Spread.NamedStyle

styleCold.BackColor = Color.Blue

styleCold.ForeColor = Color.White

styleCool.BackColor = Color.Cyan

styleMild.BackColor = Color.Lime

styleWarm.BackColor = Color.Yellow

styleHot.BackColor = Color.Red

Dim co As New FarPoint.Win.Spread.ComparisonOperator

FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleCold, co.LessThan, "32")

FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleCool, co.Between, "32", "55")

FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleMild, co.Between, "55", "75")

FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleWarm, co.Between, "75", "85")

FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleHot, co.GreaterThan, "85")

FpSpread1.ActiveSheet.Cells(1, 1).Value = 38

Dim cf As FarPoint.Win.Spread.ConditionalFormat()

Dim item As New FarPoint.Win.Spread.ConditionalFormat(styleCool)

cf = FpSpread1.ActiveSheet.GetConditionalFormats(1, 1, False)

For Each item In cf

MessageBox.Show(item.LastCondition.ToString())

Next

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值