|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Visual Basic .Net List BoxI am having a problem with a list box on a form. I have a list box that when
I add items to it the text does not show up in the list box. I know thy are added because the side scroll bar changes and I can scrolll throught the list box. I can not figure out why the items are not being displayed. I have checked that the background color and the text color are different. Please let me know what else could be wrong Show the newsgroup the code you have & we'll see where you are going wrong
Are you positive you're adding type "text" to it? The listbox.items.add
method accepts a type "object" so it wouldn't produce an error if you tried to add something that was not text. Could you provide some code from your application? -Jason Show quoteHide quote "Hank1234" <Hank1***@discussions.microsoft.com> wrote in message news:0042E09A-9120-4134-8B22-2DB72A7FC2D4@microsoft.com... >I am having a problem with a list box on a form. I have a list box that >when > I add items to it the text does not show up in the list box. I know thy > are > added because the side scroll bar changes and I can scrolll throught the > list > box. I can not figure out why the items are not being displayed. I have > checked that the background color and the text color are different. Please > let me know what else could be wrong > Here is the code I was testing with.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") ListBox1.Items.Add("HELLO") End Sub Show quoteHide quote "OpticTygre" wrote: > Are you positive you're adding type "text" to it? The listbox.items.add > method accepts a type "object" so it wouldn't produce an error if you tried > to add something that was not text. Could you provide some code from your > application? > > -Jason > > "Hank1234" <Hank1***@discussions.microsoft.com> wrote in message > news:0042E09A-9120-4134-8B22-2DB72A7FC2D4@microsoft.com... > >I am having a problem with a list box on a form. I have a list box that > >when > > I add items to it the text does not show up in the list box. I know thy > > are > > added because the side scroll bar changes and I can scrolll throught the > > list > > box. I can not figure out why the items are not being displayed. I have > > checked that the background color and the text color are different. Please > > let me know what else could be wrong > > > > > Nothing wrong with that as far as I can see. Definately weird. If I think
of anything, I'll post back. I'm not sure if any kind of system font changes or anything would affect it or not. Try doing ListBox1.Items.Add(New String("Hello")) That will most likely come up with the same result, but it's worth a shot. Sorry I can't be of more help on this one. -Jason Show quoteHide quote "Hank1234" <Hank1***@discussions.microsoft.com> wrote in message news:981D4CDC-2A8D-44FA-B106-2F4049BBAFD7@microsoft.com... > Here is the code I was testing with. > > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles Button1.Click > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > End Sub > > "OpticTygre" wrote: > >> Are you positive you're adding type "text" to it? The listbox.items.add >> method accepts a type "object" so it wouldn't produce an error if you >> tried >> to add something that was not text. Could you provide some code from >> your >> application? >> >> -Jason >> >> "Hank1234" <Hank1***@discussions.microsoft.com> wrote in message >> news:0042E09A-9120-4134-8B22-2DB72A7FC2D4@microsoft.com... >> >I am having a problem with a list box on a form. I have a list box that >> >when >> > I add items to it the text does not show up in the list box. I know thy >> > are >> > added because the side scroll bar changes and I can scrolll throught >> > the >> > list >> > box. I can not figure out why the items are not being displayed. I have >> > checked that the background color and the text color are different. >> > Please >> > let me know what else could be wrong >> > >> >> >>
Show quote
Hide quote
"=?Utf-8?B?SGFuazEyMzQ=?=" <Hank1***@discussions.microsoft.com> wrote in The code is fine. If you've been playing with the properties, check to news:981D4CDC-2A8D-44FA-B106-2F4049BBAFD7@microsoft.com: > Here is the code I was testing with. > > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e > As > System.EventArgs) Handles Button1.Click > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > ListBox1.Items.Add("HELLO") > End Sub > > "OpticTygre" wrote: > >> Are you positive you're adding type "text" to it? The >> listbox.items.add method accepts a type "object" so it wouldn't >> produce an error if you tried to add something that was not text. >> Could you provide some code from your application? >> >> -Jason >> >> "Hank1234" <Hank1***@discussions.microsoft.com> wrote in message >> news:0042E09A-9120-4134-8B22-2DB72A7FC2D4@microsoft.com... >> >I am having a problem with a list box on a form. I have a list box >> >that when >> > I add items to it the text does not show up in the list box. I know >> > thy are >> > added because the side scroll bar changes and I can scrolll >> > throught the list >> > box. I can not figure out why the items are not being displayed. I >> > have checked that the background color and the text color are >> > different. Please let me know what else could be wrong >> > >> >> >> make sure DrawMode is set to normal. Thats the only thing I can find that produces those results (Scrollbars showing, but no text) MP I have tried the "ListBox1.Items.Add(New String("Hello"))" code but it
produces the same result of no text but the scroll bars show up. I have also checked the properties of the list box and the DrawMode is set to "Normal". Even if I manually change the items (before runtime) it does the same thing. Any other ideas? Show quoteHide quote "MeltingPoint" wrote: > "=?Utf-8?B?SGFuazEyMzQ=?=" <Hank1***@discussions.microsoft.com> wrote in > news:981D4CDC-2A8D-44FA-B106-2F4049BBAFD7@microsoft.com: > > > Here is the code I was testing with. > > > > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e > > As > > System.EventArgs) Handles Button1.Click > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > ListBox1.Items.Add("HELLO") > > End Sub > > > > "OpticTygre" wrote: > > > >> Are you positive you're adding type "text" to it? The > >> listbox.items.add method accepts a type "object" so it wouldn't > >> produce an error if you tried to add something that was not text. > >> Could you provide some code from your application? > >> > >> -Jason > >> > >> "Hank1234" <Hank1***@discussions.microsoft.com> wrote in message > >> news:0042E09A-9120-4134-8B22-2DB72A7FC2D4@microsoft.com... > >> >I am having a problem with a list box on a form. I have a list box > >> >that when > >> > I add items to it the text does not show up in the list box. I know > >> > thy are > >> > added because the side scroll bar changes and I can scrolll > >> > throught the list > >> > box. I can not figure out why the items are not being displayed. I > >> > have checked that the background color and the text color are > >> > different. Please let me know what else could be wrong > >> > > >> > >> > >> > > The code is fine. If you've been playing with the properties, check to > make sure DrawMode is set to normal. Thats the only thing I can find > that produces those results (Scrollbars showing, but no text) > > MP > "Hank1234" <Hank1***@discussions.microsoft.com> schrieb: Maybe the problem is caused by an unpatched virus scanner. These symptoms>I am having a problem with a list box on a form. I have a list box that >when > I add items to it the text does not show up in the list box. I know thy > are > added because the side scroll bar changes and I can scrolll throught the > list > box. I can not figure out why the items are not being displayed. I have > checked that the background color and the text color are different. are typically caused by a McAfee VirusScan problem that NAI is aware of and that can be fixed by installing a patch: Patch 5 for McAfee VirusScan Enterprise 8.0i <URL:https://knowledgemap.nai.com/phpclient/viewKDoc.aspx?url=kb/kb_kb38717.xml&docType=DOC_KnowledgeBase> -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Thank you for the link, we are running McAfee VirusScan Enterprise 8.0i
and it is fairly new to the enviroment. I will guess that this is the problem and will see why we do not allready have this patch. Thanks again. Show quoteHide quote "Herfried K. Wagner [MVP]" wrote: > "Hank1234" <Hank1***@discussions.microsoft.com> schrieb: > >I am having a problem with a list box on a form. I have a list box that > >when > > I add items to it the text does not show up in the list box. I know thy > > are > > added because the side scroll bar changes and I can scrolll throught the > > list > > box. I can not figure out why the items are not being displayed. I have > > checked that the background color and the text color are different. > > Maybe the problem is caused by an unpatched virus scanner. These symptoms > are typically caused by a McAfee VirusScan problem that NAI is aware of and > that can be fixed by installing a patch: > > Patch 5 for McAfee VirusScan Enterprise 8.0i > <URL:https://knowledgemap.nai.com/phpclient/viewKDoc.aspx?url=kb/kb_kb38717.xml&docType=DOC_KnowledgeBase> > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/> > > Did you try removing the listbox from the form & then adding a new one. It
will keep the same default name, so, you won't need to alter your code. Does that make any difference? McAfee lets viruses through.. Symantec Antivirus 9.0 Corporate Edition is far better!! The patch has solved the problem, thanks again.
Show quoteHide quote "Herfried K. Wagner [MVP]" wrote: > "Hank1234" <Hank1***@discussions.microsoft.com> schrieb: > >I am having a problem with a list box on a form. I have a list box that > >when > > I add items to it the text does not show up in the list box. I know thy > > are > > added because the side scroll bar changes and I can scrolll throught the > > list > > box. I can not figure out why the items are not being displayed. I have > > checked that the background color and the text color are different. > > Maybe the problem is caused by an unpatched virus scanner. These symptoms > are typically caused by a McAfee VirusScan problem that NAI is aware of and > that can be fixed by installing a patch: > > Patch 5 for McAfee VirusScan Enterprise 8.0i > <URL:https://knowledgemap.nai.com/phpclient/viewKDoc.aspx?url=kb/kb_kb38717.xml&docType=DOC_KnowledgeBase> > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/> > >
Hiding items in base classes
activeX doesn't dispose ImageList issue delete a record from datagrid detect mouse event on node of a treeview unbounded array of objects gets error when instantiating elements Problems with pictureboxes and memory usage FTP client newbie stupidity: opening one form and closing another Adding the same file to multiple projects. |
|||||||||||||||||||||||