Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.NET Listbox problem 1

Status
Not open for further replies.

jocarter

Programmer
Feb 2, 2005
2
GB
I am new to VB.NET and so opened a simple project with one form and one listbox on the form. Within the form's load sub I added 3 items to the listbox using the syntax listbox1.items.add("text value1")

The problem is that, when I run the program, the listbox displays but the values in the listbox are not showing, although they are there! (I moved the listbox selected value to a textbox to show that the listbox is populated)....

Can anyone help, please?!
 
I could not duplicate this issue. I would say, make sure there is nothing else referencing the list box. Make sure it is not data bound. Make sure the .displaymember and .valuemember are not set. And if all else fails, after the listbox.items.add("") line, stick in a listbox.refresh.

-Rick

----------------------
 
The listbox is definitely not databound and .displaymember and .valuemember are not set...The listbox.refresh doesn't do anything to help either, but thanks for the response!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top