For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > September 2004 > listbox and combobox items are invisible









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author listbox and combobox items are invisible
WolfenSteed

2004-09-29, 9:27 pm

Some recent Windows update caused a change in Visual Basic - Visual Studio
2003 that causes the following aberrant behavior:
Items added to a listbox (or combobox) creates invisible items (that can be
selected).
To reproduce this behavior I can create a new Windows Application and paste
this code in the form.load event:
Dim listBox1 As New ListBox
listBox1.Size = New System.Drawing.Size(200, 100)
listBox1.Location = New System.Drawing.Point(10, 10)
Me.Controls.Add(listBox1)
listBox1.BeginUpdate()
Dim x As Integer
For x = 1 To 50
listBox1.Items.Add("Item " & x.ToString())
Next x
listBox1.EndUpdate()
Veign

2004-09-29, 9:27 pm

Try a newsgroup with DotNet in the name as you will probably get an answer
alot quicker. These newsgroups are really for VB Classic (6 and below)..

Good luck.

--
Chris Hanscom
MVP (Visual Basic)
http://www.veign.com
--

"WolfenSteed" <WolfenSteed@discussions.microsoft.com> wrote in message
news:DD812E6C-E0C1-4ABB-B60F-9A9B06FF2DB2@microsoft.com...
> Some recent Windows update caused a change in Visual Basic - Visual Studio
> 2003 that causes the following aberrant behavior:
> Items added to a listbox (or combobox) creates invisible items (that can

be
> selected).
> To reproduce this behavior I can create a new Windows Application and

paste
> this code in the form.load event:
> Dim listBox1 As New ListBox
> listBox1.Size = New System.Drawing.Size(200, 100)
> listBox1.Location = New System.Drawing.Point(10, 10)
> Me.Controls.Add(listBox1)
> listBox1.BeginUpdate()
> Dim x As Integer
> For x = 1 To 50
> listBox1.Items.Add("Item " & x.ToString())
> Next x
> listBox1.EndUpdate()



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com