下面的代码创建了一个复杂边框。左边是绿色的实线,底边是黑色的双实线,上边和右边都没有边框。效果图如下:
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) |
|