回复 3楼yaoxiaoqiang00的帖子
可通过点击单元格事件活动,参考代码如下:
- void gcSpread1_MouseDown(object sender, MouseButtonEventArgs e)
- {
- HitTestInformation info = gcSpreadSheet1.HitTest(e.GetPosition(gcSpreadSheet1).X, e.GetPosition(gcSpreadSheet1).Y);
- if (info.HitTestType == HitTestType.Corner)
- gcSpreadSheet1.Sheets [0].SetText (0,0,"Click SheetCorner of control");
- if (info.HeaderInfo != null)
- {
- if (info.HeaderInfo.InColumnResize)
- gcSpreadSheet1.Sheets[0].SetText(0, 0, "Column" + info.HeaderInfo.Column.ToString() + " is resizing");
- else if (info.HeaderInfo.InRowResize)
- gcSpreadSheet1.Sheets[0].SetText(0, 0, "Row" + info.HeaderInfo.Row.ToString() + " is resizing");
- }
- }
复制代码 |