-
July 1st, 2010, 05:34 AM
#1
Update the listbox
I have a listbox and it add an item when I click the button. My problem is, it doesn't show the item that was added until the process is not yet finish. What I want is that every time I insert string in the listbox, it will show that the item is added one by one. I try to use the refresh but nothing happen.
Any Suggestions... Thanks guys.
-
July 1st, 2010, 07:43 AM
#2
Re: Update the listbox
you could do this...
Code:
for (int i = 0; i < 10; i++)
{
listBox1.Items.Add(i.ToString());
Application.DoEvents();
}
Thats the simple answer.
===============================
My Blog
-
July 1st, 2010, 07:29 PM
#3
Re: Update the listbox
Thanks. That's what I'm looking for. I used this in vb.net but I can't remember the syntax.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|