huanghengxiang 你好,可以在 SelectionChanged 事件中使用 AddSelection 方法实现,代码如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- this.fpSpread1.ActiveSheet.Cells[0, 0].RowSpan = 2;
- this.fpSpread1.ActiveSheet.Cells[0, 0].ColumnSpan = 2;
- }
- private void fpSpread1_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
- {
- this.fpSpread1.ActiveSheet.AddSelection(0, 0, 2, 2);
- }
复制代码 |