该区域在Spread中叫做Corner,可以设置样式和显示内容,其使用方法在帮助文档中的【Spread for Windows Forms 6.0 Documentation 】->【Developer's Guide】->【Customizing the Sheet Appearance】->【Customizing the Sheet Corner Appearance】有详细说明。
比如,可以通过下面的代码来设置:
- fpSpread1.ActiveSheet.SheetCorner.DefaultStyle.Renderer = new FarPoint.Win.Spread.CellType.CornerRenderer();
- fpSpread1.ActiveSheet.AllowTableCorner = true;
- fpSpread1.ActiveSheet.SheetCorner.RowCount = 6;
- fpSpread1.ActiveSheet.SheetCorner.ColumnCount = 6;
- fpSpread1.ActiveSheet.SheetCorner.AlternatingRows[0].BackColor = Color.Violet;
- fpSpread1.ActiveSheet.SheetCorner.Cells[0, 0].Text = "Test";
- fpSpread1.ActiveSheet.SheetCorner.Columns[0].Border = new FarPoint.Win.LineBorder(Color.Green);
- fpSpread1.ActiveSheet.SheetCorner.Rows[0].Border = new FarPoint.Win.LineBorder(Color.Green);
- fpSpread1.ActiveSheet.SheetCorner.HorizontalGridLine = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None);
- fpSpread1.ActiveSheet.SheetCorner.VerticalGridLine = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None);
- fpSpread1.ActiveSheet.SheetCorner.DefaultStyle.VisualStyles = FarPoint.Win.VisualStyles.Off;
复制代码 |