回复 1楼moriya的帖子
你的这个问题是 Spread for WinForms 的吧,可以在KeyDown中自定义拷贝行为:
- private void Form1_Load(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Row;
- fpSpread1.KeyDown += new KeyEventHandler(fpSpread1_KeyDown);
- }
- void fpSpread1_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.Control && e.KeyCode == Keys.C)
- {
- fpSpread1.ActiveSheet.ClipboardCopy(new FarPoint.Win.Spread.Model.CellRange(fpSpread1.ActiveSheet.ActiveRowIndex, fpSpread1.ActiveSheet.ActiveColumnIndex, 1, 1), FarPoint.Win.Spread.ClipboardCopyOptions.All);
- e.Handled = true;
- }
- }
复制代码 |