473,388 Members | 1,399 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

VB.Net 2003 ListBox not showing text

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?

Sep 18 '06 #1
4 3145
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.

ja********@doveq.net wrote:
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?
Sep 18 '06 #2

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)

Sep 18 '06 #3
Is the computer using an unpatched version of McAfee 8? If so, patch the
computer or turn off buffer overrun protection.
On Mon, 18 Sep 2006 14:27:14 +0200, <ja********@doveq.netwrote:
>
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)


--
Happy Coding!
Morten Wennevik [C# MVP]
Sep 18 '06 #4

Morten Wennevik wrote:
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.

Sep 18 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Peter Moscatt | last post by:
I am having trouble understanding the methods for the Listbox from Tk. If I was to select at item in the list using a mouse click (have already created the bind event) - what method returns the...
2
by: JMorrell | last post by:
I’m trying to populate a listbox with data that comes from my SQL server. I’ve created the connection, filled the dataset and loaded the data adapter. Apparently, I’m missing something...
6
by: Grant Schenck | last post by:
Hello, This seems like it should be easy... I have a listbox on a .NET form. I add a new item to the list box. How can I associated a separate data value?
12
by: amber | last post by:
Hello, I'm going around in circles with this problem and I hope someone can help me. I have a listbox that is populated from a SQL Server database, with about 600 items, all strings. I have a...
4
by: Marcos Beccar Varela | GamaCom Argentina | last post by:
Hello Everyone. I need to use a gridview, that when I use the Update command one of the colums, instead of showing a textbox where the user can write, I need a combobox (listobx), where there are...
1
by: Dessip | last post by:
Hey there, my question is, I have got 2 List Boxes, on a page, and listbox 1 generates list box 2 items, but both are generated from SQL, but its not worknig on auto post back: Code...
1
by: Jason L. Froebe | last post by:
Visual C# 2003, with latest .NET 1.1 SDK patch. I've created a simple test app containing a list box and a button. When the button is clicked on, it adds three items to the listBox and...
3
by: perrycheung221 | last post by:
Hi guys, I got 2 listboxes in a window form, one on left and one on right. The 1st listbox have some items while the 2nd listbox is empty. Also there are 2 buttons between the 2 listboxes which...
9
by: zdrakec | last post by:
Hello all: Clearly, I'm not getting it! Here is the scenario: On a web page, I have two list boxen and a text box. The first listbox is populated at page load time (if it is not a postback)....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.