回复 8楼ChinaBoyZY的帖子
参考代码如下:
- else if ((e.Button & MouseButtons.Left) == MouseButtons.Left)
- {
- HitTestInformation hi = fpSpread1.HitTest(e.X, e.Y);
- if (fpSpread1.Cursor == Cursors.Cross)//获取上/下双向大小调整
- {
- Drag = true;
- DateTime dt = Convert.ToDateTime("04:46");
- FarPoint.Win.Spread.Model.CellRange cr = fpSpread1.ActiveSheet.Models.Span.Find(hi.ViewportInfo.Row, hi.ViewportInfo.Column);
- //移除合并单元格方法
- fpSpread1.ActiveSheet.Models.Span.Remove(hi.ViewportInfo.Row, hi.ViewportInfo.Column);
- c1SuperTooltip1.Show(dt.AddMinutes(hi.ViewportInfo.Row).ToString("hh:mm"), this, e.X + 10, e.Y + 10);
- if (cr != null)
- {
- if (fpSpread1.ActiveSheet.Cells[cr.Row, cr.Column].Value == null)
- {
- fpSpread1.ActiveSheet.Models.Span.Remove(cr.Row, cr.Column);
- }
- else
- {
- //MessageBox.Show("工作任务重复!!");
- }
- }
- }
复制代码 |