A
AnakinVB
Guest
Hello,
As you can see if you try out my code (below) I am able to populate a list box from whatever the user enters into a text box. However, I haven't quite gotten it to work in the reverse direction.
How can I populate a text box by single or double-clicking an item on a list box?
Here's what I've got so far:
Any .NET suggestions?
thx,
Anakin
As you can see if you try out my code (below) I am able to populate a list box from whatever the user enters into a text box. However, I haven't quite gotten it to work in the reverse direction.
How can I populate a text box by single or double-clicking an item on a list box?
Here's what I've got so far:
Visual Basic:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox2.Text = Cstr(ListBox1.Items())
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ListBox1.Items().Add(TextBox1.Text)
End Sub
thx,
Anakin
Last edited by a moderator: