M
Michael Hesse
Hi,
I am trying to set the focus to a text box after the user selects an item
from a ListView. Here is what I am trying:
Private Sub lv1_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles lv1.SelectedIndexChanged
if lv1.SelectedItems.Count = 0 Then Exit Sub
lbl1.Text = lv1.SelectedItems(0).Text()
txt1.Focus()
End Sub
The problem is that the cursor seem to go briefly to the TextBos txt1, but
then focus returns to the item on the ListView that I originally selected.
Does anyone have any suggestions?
Thanks.
I am trying to set the focus to a text box after the user selects an item
from a ListView. Here is what I am trying:
Private Sub lv1_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles lv1.SelectedIndexChanged
if lv1.SelectedItems.Count = 0 Then Exit Sub
lbl1.Text = lv1.SelectedItems(0).Text()
txt1.Focus()
End Sub
The problem is that the cursor seem to go briefly to the TextBos txt1, but
then focus returns to the item on the ListView that I originally selected.
Does anyone have any suggestions?
Thanks.