deppp 你好
可以通过下面的代码来实现双击选中全部文本的需求:
- private void Form1_Load(object sender, EventArgs e)
- {
- fpSpread1.EditModeOn += new EventHandler(fpSpread1_EditModeOn);
- }
- void fpSpread1_EditModeOn(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.CellType.GeneralEditor editor = fpSpread1.EditingControl as FarPoint.Win.Spread.CellType.GeneralEditor;
- if (editor != null)
- {
- editor.DoubleClick += new EventHandler(editor_DoubleClick);
- }
- }
- void editor_DoubleClick(object sender, EventArgs e)
- {
- (sender as FarPoint.Win.Spread.CellType.GeneralEditor).SelectAll();
- }
复制代码 |