单元格本身也有LockBackColor 的属性,您可以单独设置
- fpSpread1.ActiveSheet.Cells[1, 1].LockBackColor = Color.Tomato;
- fpSpread1.ActiveSheet.Cells[1, 1].LockForeColor = Color.DarkBlue;
- fpSpread1.ActiveSheet.Cells[1, 1].LockFont = new Font("Calibri", 11);
- fpSpread1.ActiveSheet.Cells[1, 1].Text = "Locked";
- fpSpread1.ActiveSheet.Cells[1, 1].Locked = true;
复制代码 |