回复 1楼xiafu568的帖子
1.“spread有没有事件判断复制的行数” 的问题正在调查中。
2.第二个问题实现方法如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- System.Windows.Forms.ContextMenu cm = new ContextMenu();
- MenuItem mi=new MenuItem();
- mi.Text="复制";
- mi.Click+=new EventHandler(mi_Click);
- cm.MenuItems.Add(mi);
- this.fpSpread1.ContextMenu = cm;
- }
- void mi_Click(object sender, EventArgs e)
- {
- CellRange cr=this.fpSpread1.Sheets[0].GetSelection(0);
- this.fpSpread1.Sheets[0].ClipboardCopy(cr);
- }
复制代码 |