Listbox Display problem

Posted on 2006-05-16
Medium Priority
Last Modified: 2010-04-23
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?

Question by:mpdillon
1 Comment

Accepted Solution

BNLIND earned 500 total points
ID: 16695462
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.

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question