The single cell or table of cells in the sheet corner can be customized. You can set the cells to any of the cell types that are supported by Spread. You can also customize properties of the Cell class.
You can change the cell type of the cells in the sheet corner by setting a new cell type for the SheetCornerStyle property of the sheet (SheetView class). When you set the SheetCornerStyle.CellType, all the cells in the sheet corner are changed to that type.
The following examples set the sheet corner to be a check box or a button.
The following code sets the sheet corner to be check box cells by setting the sheet corner style (as shown in the preceding illustration).
C# |
Copy Code
|
---|---|
fpSpread1.ActiveSheet.AllowTableCorner = true; fpSpread1.ActiveSheet.SheetCorner.ColumnCount = 4; fpSpread1.ActiveSheet.SheetCorner.RowCount = 5; fpSpread1.ActiveSheet.SheetCornerStyle.CellType = new FarPoint.Win.Spread.CellType.CheckBoxCellType(); |
VB |
Copy Code
|
---|---|
fpSpread1.ActiveSheet.AllowTableCorner = True fpSpread1.ActiveSheet.SheetCorner.ColumnCount = 4 fpSpread1.ActiveSheet.SheetCorner.RowCount = 5 fpSpread1.ActiveSheet.SheetCornerStyle.CellType = New FarPoint.Win.Spread.CellType.CheckBoxCellType() |
The following code sets the sheet corner to be button cells by assigning the button cell type to the cells in the sheet corner (as shown in the preceding illustration).
C# |
Copy Code
|
---|---|
fpSpread1.ActiveSheet.AllowTableCorner = true; fpSpread1.ActiveSheet.SheetCorner.ColumnCount = 4; fpSpread1.ActiveSheet.SheetCorner.RowCount = 5; fpSpread1.ActiveSheet.SheetCorner.Cells[2,3].CellType = new FarPoint.Win.Spread.CellType.ButtonCellType(); |
VB |
Copy Code
|
---|---|
fpSpread1.ActiveSheet.AllowTableCorner = True fpSpread1.ActiveSheet.SheetCorner.ColumnCount = 4 fpSpread1.ActiveSheet.SheetCorner.RowCount = 5 fpSpread1.ActiveSheet.SheetCorner.Cells(2,3).CellType = New FarPoint.Win.Spread.CellType.ButtonCellType() |