Right now I have a touchscreen with a virual keyboard.
I would like to create arrow keys. If the user messed up the inputted text, he can move the blinking cursor left one space at a time between inputted characters to add a letter. Then a button to move the blinking cursor back to the end of the inputted text.
Private Sub Left Arrow_Click()
If Text1.SelStart Then Text1.SelStart = Text1.SelStart - 1
Text1.SetFocus
End Sub
Private Sub Right Arrow_Click()
If Text1.SelStart < Len(Text1.Text) Then Text1.SelStart = Text1.SelStart + 1
Text1.SetFocus
End Sub
Private Sub Enter Letter_Click()
Text1.Text = Text1.Text + Command1(Index).Caption
For i = 0 To Command1.ubound
Command1(i).Caption = LCase(Command1(i).Caption)
Next
cmdLowercase.Visible = False
End Sub
When the cursor is moved left, I would like to have the next letter inserted where the cursor is blinking, not at the end of what's already entered.
With what I have so far, the cursor will move left after some letters are entered into the textbox. But when the next letter is selected it inserts it at the very end.
Basically in my textbox I want to enter more text wherever the cursor is blinking...
If I select a random part of the entered text and enter another letter or hit the backspace button, it adds the letter at the end or backspaces from the end.
Can anyone help me please?