VB.Net 2003 ListBox not showing text

J

james.hunt

I am using VB.Net 2003 on a Windows 2000 machine to load directory
contents into a ListBox. For some unknown reason the text is not
visible, however, if I assign a label to the selected item in the list
box the file name shows up in the label, so I know the the file list is
being loaded into the box.

Any ideas? I have tried the application on mulitple win2k machines
and no luck, however, on a winxp machine it works like a charm.

Any ideas how I can track down why the app works on xp and not 2k?
 
S

Sean Chambers

Use the "DataTextField" and "DataValueField" to set what field is used
for value, and what is used for display text.

I.e.:

MyListBox.DataTextField = "MyTextField";
MyListBox.DataValueField = "MyIDField";

thats in c#, but you get the idea.
 
J

james.hunt

Sean Chambers wrote:
[snip]
MyListBox.DataTextField = "MyTextField";
MyListBox.DataValueField = "MyIDField";

thats in c#, but you get the idea.

I am using:

ListBox1.Items.Add(myVariableString)
 
M

Morten Wennevik

Is the computer using an unpatched version of McAfee 8? If so, patch the
computer or turn off buffer overrun protection.


Sean Chambers wrote:
[snip]
MyListBox.DataTextField = "MyTextField";
MyListBox.DataValueField = "MyIDField";

thats in c#, but you get the idea.

I am using:

ListBox1.Items.Add(myVariableString)
 
J

james.hunt

Morten said:
Is the computer using an unpatched version of McAfee 8? If so, patch the
computer or turn off buffer overrun protection.

Morten, good call! We are using McAfee 8. Didn't even think about
checking it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top