找回密码
 立即注册

QQ登录

只需一步,快速开始

gw0506

超级版主

181

主题

4212

帖子

9049

积分

超级版主

Rank: 8Rank: 8

积分
9049

活字格认证

gw0506
超级版主   /  发表于:2010-5-14 17:54  /   查看:8014  /  回复:0
下面的代码创建了一个复杂边框。左边是绿色的实线,底边是黑色的双实线,上边和右边都没有边框。效果图如下:

jpg

jpg




[C# Code]
fpSpread1.Sheets[0].ColumnCount = 4;
fpSpread1.Sheets[0].RowCount = 5;
FarPoint.Win.ComplexBorderSide leftborder = new FarPoint.Win.ComplexBorderSide(Color.Green, 3);
FarPoint.Win.ComplexBorderSide bottomborder = new FarPoint.Win.ComplexBorderSide(Color.Black, 3, System.Drawing.Drawing2D.DashStyle.Solid, null, new float[] {0, 0.33F, 0.66F, 1});
fpSpread1.Sheets[0].Cells[1,1,2,2].Border = new FarPoint.Win.ComplexBorder(leftborder, null, null, bottomborder);

[Visual Basic Code]
FpSpread1.Sheets(0).ColumnCount = 4
FpSpread1.Sheets(0).RowCount = 5
Dim leftborder As New FarPoint.Win.ComplexBorderSide(Color.Green, 3)
Dim bottomborder As New FarPoint.Win.ComplexBorderSide(Color.Black, 3, Drawing2D.DashStyle.Solid, Nothing, New Single() {0, 0.33, 0.66, 1})
FpSpread1.Sheets(0).Cells(1,1,2,2).Border = New FarPoint.Win.ComplexBorder(leftborder, Nothing, Nothing, bottomborder)

0 个回复

您需要登录后才可以回帖 登录 | 立即注册
返回顶部