Listboxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Okay, I have on the left of my form, a listbox. I specified the items to be test, test2, and test3. Now when I click one, I want the textbox, on the right, to show a stored string, such as "You clicked Test2.
If that cannot be done, how about when you select an item, you click a button, called Show, which would then show the stored string in the textbox on the right
Also is it possible for the stored string to come from a database.
 
In a project I am working on I created a listbox and used a "CASE" structure to define what I wanted. Select Case lsttest.Selected Index

Case 0
lbltest = "You have selected test 1."
 
Since I have no clue how to add that into my, project,
could someone please clear it up for me?


-----Original Message-----
In a project I am working on I created a listbox and
used a "CASE" structure to define what I wanted. Select
Case lsttest.Selected Index
 
Hi Bill,

I asume you are using visual.studio.net

Click in the designer part on the form on your listbox and go to the code

There is made an so called on click event (you see it in the bottom of your
code)

There you can write something as

textbox1.text = "You selected row " & listbox1.selectedindex.tostring

Give it a try?

Cor
 
Back
Top