回复 1楼deppp的帖子
这可以通过以下代码来实现:
- private void Form1_Load(object sender, EventArgs e)
- {
- fpSpread1.LostFocus += new EventHandler(fpSpread1_LostFocus);
- fpSpread1.GotFocus += new EventHandler(fpSpread1_GotFocus);
- }
- void fpSpread1_GotFocus(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode;
- fpSpread1.ResetFocusRenderer();
- }
- void fpSpread1_LostFocus(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.Normal;
- fpSpread1.FocusRenderer = null;
- fpSpread1.ActiveSheet.ActiveRowIndex = -1;
- }
复制代码 |