OK, here's a wierd one... I have a listbox, which I fill with strings (in my
case, file names). I normally load this via a loop, adding each item to the
list box in the loop. I put lb.BeginUpdate before the start of the loop, and
lb.EndUpdate at the conclusion of the loop.
Here's the wierd part: If there is only ONE line loaded into the list box,
the list box SHOWS UP AS BLANK! It says there is 1 item in the box, but it
never shows up on the screen, nor can it be clicked. However, if TWO or more
items are loaded into the list box, they all show up fine!
I've traced this to the Begin and End Update statements. If I remove these,
then everything works fine - including only loading one item into the
listbox. The second that I put the Begin..EndUpdat e lines back in, the
previous behavior occurs.
Any ideas as to why? Is this a list box bug? I would like to use the
Begin...EndUpda te as I could end up loading a large amount of data into the
listbox. But for the time being, I will have to remove the lines.
BTW, using VB.NET 2003 with Framework 1.1
Tom