Welcome Guest Search | Active Topics | Sign In | Register

Progress Bar Options
Lee Velez
Posted: Tuesday, January 27, 2009 2:48:52 PM
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;

}
eo_support
Posted: Tuesday, January 27, 2009 4:01:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,089
That's not how the ProgressBar works. Please see this sample for more details:

http://demo.essentialobjects.com/Default.aspx?path=ProgressBar\_i2

The source code contains a large chunk of comment that provided much more details. So make sure you read that.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.