回复 12楼iceman的帖子
请修改代码如下:
- Private Sub FpSpread_EditChange(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles FpSpread.EditChange
- If spdGaihan.ActiveColumnIndex = 1 Then
- FpSpread.EditModeReplace = False
- spdGaihan.Cells(spdGaihan.ActiveRowIndex, spdGaihan.ActiveColumnIndex).Text = Post_No_Edit(spdGaihan.Cells(spdGaihan.ActiveRowIndex, spdGaihan.ActiveColumnIndex).Text)
- If spdGaihan.Cells(spdGaihan.ActiveRowIndex, spdGaihan.ActiveColumnIndex).Text.Length = 5 Then
- Dim editor As GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxEditingControl = TryCast(e.EditingControl, GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxEditingControl)
- editor.SelectionStart = 5
- End If
- End If
- End Sub
复制代码 |