Rank: Advanced Member Groups: Member
Joined: 1/16/2009 Posts: 43
|
Hi, I have a simple project with one button. I have a simple for loop statement with an integer variable and I am assigning it to the progressbar's value property. I see it progress but I only catch the last like 10% or so (above 90% or so). I tried the system.threading.thread.sleep(500) but didn't make a diff. Any ideas what I'm doing wrong? Here is my code. I know this used to happen in a windows apps but all I had to was repaint the screen to refresh.
My min is set to 0 and max to 1000:
protected void Button1_Click(object sender, EventArgs e) { for (int i = 0; i < 1000; i++) { ProgressBar1.Value = i; }
ProgressBar1.Value = 1000; }
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
That's not how the ProgressBar works. Please see this sample for more details: http://demo.essentialobjects.com/Default.aspx?path=ProgressBar\_i2The source code contains a large chunk of comment that provided much more details. So make sure you read that. Thanks!
|