line type 用Flat
FarPoint.Win.Spread.GridLine gl = new FarPoint.Win.Spread.GridLine(GridLineType.Flat, Color.Blue);
fpSpread1.ActiveSheet.HorizontalGridLine = gl;
如果用Raised 还需要设置两个颜色
FarPoint.Win.Spread.GridLine gl = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Raised, Color.Blue, Color.Red, Color.Yellow, 3);
fpSpread1.ActiveSheet.HorizontalGridLine = gl;
fpSpread1.ActiveSheet.VerticalGridLine = gl; |