items not displayed in listbox

lizz

New member
Joined
Aug 12, 2005
Messages
2
Programming Experience
5-10
When I add an item to a listbox, it is not displayed in the listbox (lstBox.Items.Add(value)). I have tried changing the foreground and the background. (This program worked correctly on a different machine last year.)

When I repeatedly click on the command button, eventually the a vertical scrollbar appears on the listbox (leading me to believe that something is being placed in the listbox, but I can't see it). I just added code to select an item in the listbox and VB.Net does think there is something there, but I STILL can't see it.

Ugh - any suggestions?? I'd appreciate any help on this.

-thanks,
lizz
 
Hmm that's a weird one. I'm not sure how I'd go about fixing it but for the sake of giving your thread a bump I'll try:

Check the font property, make sure it's at a font you have and at a readable size. Check the forecolor and backcolor of the listbox (I know, you said you did but try again? And is there code changing them anywhere?)

If all else fails delete the listbox and put another one on.

All I could think of. Sorry. Check the code too.
 
still not there...

I took your advice and created a new project with only a button, textbox, and a listbox. For the Button code, I have:

txtBox.Text = "2"
lstBox.Items.Add("3")


The '2' shows up in the textbox. The '3' does not display in the listbox, but I can choose the item by clicking on it. The background and foreground colors are the defaults.

This is a new machine with VB.Net 2003 recently installed. Did they miss something when they installed it??

Crazy, man.

~lizz
 
Back
Top