private void Form1_Load(object sender, EventArgs e)
{
fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.Off;
fpSpread1.Sheets[0].RowCount = 10;
fpSpread1.Sheets[0].ColumnCount = 15;
// Show the footer.
fpSpread1.Sheets[0].ColumnFooterVisible = true;
fpSpread1.Sheets[0].ColumnFooterRowCount = 2;
fpSpread1.Sheets[0].ColumnFooter.DefaultStyle.Renderer = new FarPoint.Win.Spread.CellType.ColumnHeaderRenderer();
FarPoint.Win.Spread.GridLine gl = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None, Color.Crimson, Color.Goldenrod, Color.BurlyWood);
fpSpread1.Sheets[0].ColumnFooterHorizontalGridLine = gl;
//new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Crimson);
fpSpread1.Sheets[0].ColumnFooterVerticalGridLine = gl;
//new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.BurlyWood);
fpSpread1.Sheets[0].ColumnFooterSheetCornerHorizontalGridLine = gl;
//new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Crimson);
fpSpread1.Sheets[0].ColumnFooterSheetCornerVerticalGridLine = gl;
}
这样设置又有个底纹。FarPoint.Win.Spread.GridLine gl = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None, Color.White, Color.White, Color.White);也还是这样。
我原来是:
FarPoint.Win.Spread.StyleInfo test = new FarPoint.Win.Spread.StyleInfo();
test.BackColor = System.Drawing.Color.White;
test.Border = new ComplexBorder(null, null, null, null);
this.fpSpread1.ActiveSheet.ColumnFooter.DefaultStyle = test;
这个底纹是白色了,但是Border不起作用。
如果把您上边的再加上
FarPoint.Win.Spread.StyleInfo test = new FarPoint.Win.Spread.StyleInfo();
test.BackColor = System.Drawing.Color.White;
test.Border = new ComplexBorder(null, null, null, null);
this.fpSpread1.ActiveSheet.ColumnFooter.DefaultStyle = test;
边框又出现了。 |