回复 5楼lh8350的帖子
请问你是通过什么方式设置的只读呢,能将代码发来看一看吗
我通过Locked = true,然后调用上面的代码并没有出现该情况,我的代码如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.Cells[0, 0].Locked = true;
- fpSpread1.ActiveSheet.Cells[0, 0].Value = 1;
- fpSpread1.ActiveSheet.Cells[1, 0].Locked = true;
- fpSpread1.ActiveSheet.Cells[1, 0].Value = 2;
- FarPoint.Win.Spread.InputMap im = new FarPoint.Win.Spread.InputMap();
- im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused);
- im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Delete, Keys.None), FarPoint.Win.Spread.SpreadActions.ClearSelectedCells);
- im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
- im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Delete, Keys.None), FarPoint.Win.Spread.SpreadActions.ClearSelectedCells);
- }
复制代码 |