回复 1楼dbtxwds的帖子
请通过以下代码测试:
- DialogResult dlg;
- fpSpread1.ActiveSheet.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.MultiRange;
- fpSpread1.ActiveSheet.AddSelection(0, 0, 2, 2);
- fpSpread1.ActiveSheet.AddSelection(0, 3, 2, 2);
- dlg = MessageBox.Show("Do you want to get one of the selections?", "GetSelection", MessageBoxButtons.YesNo);
- if (dlg == DialogResult.Yes)
- {
- FarPoint.Win.Spread.Model.CellRange[] cr;
- cr = fpSpread1.ActiveSheet.GetSelections();
- label1.Text = "The selection covers cells " + cr[0].Row + ", " + cr[0].Column + ", " + cr[0].RowCount + ", " + cr[0].ColumnCount;
- }
复制代码 |