回复 8楼raysoft的帖子
以下代码给 一个 Cell 上下左右 分别设置了不同的 边框。然后取值:
- FarPoint.Win.ComplexBorderSide topborder = new FarPoint.Win.ComplexBorderSide(Color.Black, 1);
- FarPoint.Win.ComplexBorderSide leftborder = new FarPoint.Win.ComplexBorderSide(Color.Black, 1);
- FarPoint.Win.ComplexBorderSide rightborder = new FarPoint.Win.ComplexBorderSide(Color.Black, 1);
- FarPoint.Win.ComplexBorderSide bottomborder = new FarPoint.Win.ComplexBorderSide(Color.Black, 3, System.Drawing.Drawing2D.DashStyle.Solid, null, new float[] { 0f, 0.33f, 0.66f, 1f });
- FarPoint.Win.ComplexBorder bord = new FarPoint.Win.ComplexBorder(leftborder, topborder, rightborder, bottomborder);
- fpSpread1.ActiveSheet.Cells[0, 0].Border = bord;
- FarPoint.Win.ComplexBorder border = (FarPoint.Win.ComplexBorder)fpSpread1.ActiveSheet.Cells[0, 0].Border;
- this.fpSpread1.Sheets[0].Cells[2, 2].Border = border;
- FarPoint.Win.ComplexBorderSide top = border.Top;
- FarPoint.Win.ComplexBorderSide bottom = border.Bottom;
- FarPoint.Win.ComplexBorderSide left= border.Left;
- FarPoint.Win.ComplexBorderSide right = border.Right;
复制代码 |