回复 7楼foamhome1的帖子
Spread Win 中可以通过以下代码实现:
- private void Form1_Load(object sender, EventArgs e)
- {
- //FarPoint.Win.Spread.CellType.CheckBoxCellType ck = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
- //ck.EditorValueChanged += new EventHandler(ck_EditorValueChanged);
- //this.fpSpread1.Sheets[0].Columns[0].CellType = ck;
- this.fpSpread1.Sheets[0].OperationMode = FarPoint.Win.Spread.OperationMode.RowMode;
- }
- private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
- {
- e.Cancel = true;
- int row = e.Row;
- if (!e.RowHeader)
- {
- FarPoint.Win.ComplexBorderSide borderSide = new FarPoint.Win.ComplexBorderSide(System.Drawing.Color.Black, 2);
- this.fpSpread1.Sheets[0].Rows[row].Border = new FarPoint.Win.ComplexBorder(null, borderSide, null, borderSide);
- this.fpSpread1.Sheets[0].Cells[row, 0].Border = new FarPoint.Win.ComplexBorder(borderSide, borderSide, null, borderSide);
- this.fpSpread1.Sheets[0].Cells[row, this.fpSpread1.Sheets[0].ColumnCount - 1].Border = new FarPoint.Win.ComplexBorder(borderSide, null, null, null);
- }
- else
- {
- FarPoint.Win.ComplexBorderSide borderSide = new FarPoint.Win.ComplexBorderSide(System.Drawing.Color.White, 2);
- this.fpSpread1.Sheets[0].Rows[row].Border = new FarPoint.Win.ComplexBorder(null, borderSide, null, borderSide);
- this.fpSpread1.Sheets[0].Rows[row].BackColor = System.Drawing.Color.Black;
- this.fpSpread1.Sheets[0].Cells[row, 0].Border = new FarPoint.Win.ComplexBorder(borderSide, borderSide, null, borderSide);
- this.fpSpread1.Sheets[0].Cells[row, this.fpSpread1.Sheets[0].ColumnCount - 1].Border = new FarPoint.Win.ComplexBorder(borderSide, null, null, null);
- }
- }
复制代码 |