Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Trouble viewing the items in the listbox in Windows form application

Posted on 2004-11-16
2
Medium Priority
?
247 Views
Last Modified: 2010-04-15
I am having trouble with displaying items in a listbox. I am using the following code in Visual Studio.Net 2003 for a windows form application

  private void button1_Click(object sender, System.EventArgs e)
            {
                  
                        
                        
                        listBox1.Items.Add(textBox1.Text);
                        
                  
            }

When I keep on pressing the button the text gets added to the list box ( as it is know by the movement of the scroll bar in the list box) but the items in list box are not visible. I have made sure that property visible of listbox is set to true. Still, i am unsuccessful

Can anyone please reply to my question

Thanks
0
Comment
Question by:partulu
2 Comments
 
LVL 8

Expert Comment

by:AaronReams
ID: 12598970
This should work.  Set a breakpoint on the line and check the value of textBox1.Text in debug mode by hovering over it with the mouse or looking in the watch window.  Make sure textBox1.Text != "".

Hope this helps.  Cheers -Aaron
0
 
LVL 11

Accepted Solution

by:
jatinderalagh earned 200 total points
ID: 12602023
This link might be of a help to u
http://www.dotnet247.com/247reference/msgs/58/292324.aspx

regards
Jatinder
 
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month21 days, 2 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question