找回密码
 立即注册

QQ登录

只需一步,快速开始

pbuilder

注册会员

13

主题

49

帖子

108

积分

注册会员

积分
108

活字格认证

pbuilder
注册会员   /  发表于:2010-9-6 14:06  /   查看:7744  /  回复:1
FPSPREAD for winForm奇偶行怎么换色
找了所有事例代码也没看见有这个事例.网上看到有一个说SetOddEvenColor的.可找半天没找着这属性.有没有哪位知道的,告诉下.谢谢啦

1 个回复

倒序浏览
gw0506
超级版主   /  发表于:2010-9-6 17:02:00
沙发
您好:
        您可以参考随软件安装的帮助文档中Creating Alternating Rows章节。
        Sheet对象上有AlternatingRows属性,您通过对它的设置可以达到想要的效果。示例代码如下:

[C#]
fpSpread1.Sheets[0].AlternatingRows.Count = 3;
fpSpread1.Sheets[0].AlternatingRows[0].BackColor = Color.RoyalBlue;
fpSpread1.Sheets[0].AlternatingRows[0].ForeColor = Color.Navy;
fpSpread1.Sheets[0].AlternatingRows[1].BackColor = Color.LightYellow;
fpSpread1.Sheets[0].AlternatingRows[1].ForeColor = Color.Navy;
fpSpread1.Sheets[0].AlternatingRows[2].BackColor = Color.Salmon;
fpSpread1.Sheets[0].AlternatingRows[2].ForeColor = Color.Navy;
[Visual Basic]
FpSpread1.Sheets(0).AlternatingRows.Count = 3
FpSpread1.Sheets(0).AlternatingRows(0).BackColor = Color.RoyalBlue
FpSpread1.Sheets(0).AlternatingRows(0).ForeColor = Color.Navy
FpSpread1.Sheets(0).AlternatingRows(1).BackColor = Color.LightYellow
FpSpread1.Sheets(0).AlternatingRows(1).ForeColor = Color.Navy
FpSpread1.Sheets(0).AlternatingRows(2).BackColor = Color.Salmon
FpSpread1.Sheets(0).AlternatingRows(2).ForeColor = Color.Navy
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部