Listbox Display problem

I have a Windows form which contains some buttons, a text box and a list box. One of the buttons causes the list box to be populated. When tested on 8 Win XP Pro computers(all with .Net Framework 1.1) at my customer's location half of the computers did not display the data that was added to the list box. Even though the individual lines on the list box were not visible, a vertical scroll bar did appear. Also I can highlight a line. I can tell where the items in the list box stop because I cannot hightlight beyond that point.  I added some code to the listbox_selectedIndexchanged event so that when I select a blank line, the contents of the line are displayed in the text box. All the data from the list box line is diplayed in the text box.
I have added Form.Refresh and Form.Listbox.refresh at various places. I have made the list box not visible and then visible again. But nothing I have tried makes the list box's text visible on those computers.
The other computers display the data without incident.
Any ideas?

thanks,
pat
mpdillonAsked:
Who is Participating?
 
BNLINDConnect With a Mentor Commented:
I had a similar problem with a listview control. There were two causes to my problem. Maybe the solution will help or at least put you in the right direction:

The first thing I was doing wrong was when I was clearing the control before loading new items, I was doing it wrong. My statement was "Listview1.Clear", when it should have been "Listview1.Items.Clear".

The second thing that was wrong was the color scheme. By accident, my code was putting white text on a white background because of the Windows XP Theme I was using at the time.

As I said, this may or may not help with your problem, but at least this will give you an idea of some things to look for when you get wierd problems like these.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.