I am trying to use the following code to move to other controls every time someone presses Enter but this code seems to require some changes to function with telerik radtextbox especially the following line "
tbs(i).KeyDown += New KeyEventHandler(AddressOf textBoxes_KeyDown)
". How can I trnslate this line into telerikPublic Partial Class Form1
Inherits Form
Private tbs As TextBox()
Public Sub New()
InitializeComponent()
tbs = New TextBox() {textBox1, textBox2, textBox3}
For i As Integer = 0 To tbs.Length - 1
tbs(i).Tag = i
tbs(i).KeyDown += New KeyEventHandler(AddressOf textBoxes_KeyDown)
Next
tbs(0).Focus()
End Sub
Private Sub textBoxes_KeyDown(sender As Object, e As KeyEventArgs)
Dim tb As TextBox = TryCast(sender, TextBox)
If tb IsNot Nothing Then
If e.KeyCode = Keys.Enter Then
Dim tag As Integer = CInt(tb.Tag)
If tag = 2 Then
tbs(0).Focus()
Else
tbs(tag + 1).Focus()
End If
End If
End If
End Sub
End Class