回复 5楼5628027的帖子
实现大体思路如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- this.fpSpread1.Sheets[0].OperationMode = FarPoint.Win.Spread.OperationMode.SingleSelect;
- FarPoint.Win.Spread.CellType.EnhancedRowHeaderRenderer ec = new FarPoint.Win.Spread.CellType.EnhancedRowHeaderRenderer();
- ec.ActiveBackgroundColor = Color.LightBlue;
- ec.SelectedActiveBackgroundColor = Color.LightBlue;
- ec.SelectedBackgroundColor = Color.LightBlue;
- fpSpread1.ActiveSheet.RowHeader.DefaultStyle.Renderer = ec;
- }
- private void setToolStripMenuItem_Click(object sender, EventArgs e)
- {
- this.fpSpread1.Sheets[0].Rows[2].BackColor = System.Drawing.Color.LightBlue;
- this.fpSpread1.Sheets[0].ActiveRowIndex = 2;
- }
复制代码 |