本帖最后由 a475207806 于 2017-3-31 14:05 编辑
您好,这边想要实现这样一种方式,从Button1按Shift+Tab向后Tab到Spread的时候,全选当前文本框内的全部内容(不是设置HighLightText=True),这是大致的画面
附上Demo代码
PS:Inputman中像SelectionStart,SelectionLength在Spread的CellType中是如何对应的呢
追记:目前使用下面的代码勉强可以实现所需功能,但是有时会失灵
Private Sub Button1_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles Button1.PreviewKeyDown
If e.Shift And e.KeyCode = Keys.Tab Then
e.IsInputKey = True
End If
End Sub
Private Sub Button1_KeyDown(sender As Object, e As KeyEventArgs) Handles Button1.KeyDown
If e.Shift = True And e.KeyCode = Keys.Tab Then
FpSpread1.EditModeReplace = True
FpSpread1.Focus()
FpSpread1.EditModeReplace = False
End If
End Sub
|
|