Progress Bar Example

For this sample I used the table order_details from samples database,

  1. Create a public library with the code is in the attached file

Create a blank application with the code below and check the library that you created in the previous step

// Barra de progresso $prb = new ProgressBar(400, 30); // create new ProgressBar (width:300px,height:30px)

$prb->left = 400; // position from left
$prb->top = 120; // position from top
$prb->addLabel('text','txt1');
$prb->setLabelFont('txt1','20');
$prb->setLabelPosition('txt1','405','122','300','20');
$prb->setBarColor('#00FF7F');
$prb->setBarDirection('right');
$prb->show(); // show the ProgressBar
$sql="SELECT * FROM order_details UNION SELECT * FROM order_details UNION SELECT * FROM order_details UNION SELECT * FROM order_details UNION SELECT * FROM order_details"; sc_lookup(dataset,$sql);

$contador= count({dataset});
$prb->max = $contador;
for($b=0;$b<$contador;$b++) {
   
   $nome = {dataset[$b][0]};
   $cpf = {dataset[$b][1]};
   $id = {dataset[$b][2]};
   $prb->moveStep($b);
   $prb->setLabelValue('txt1','Processando: '.$b.'/'.$contador);
   flush();
   ob_flush();}
$prb->setLabelValue('txt1','Concluido!');    

ProgressBar.txt (17.5 KB)

1 Like

hi paulomarcelo

thanks for the code

can you tell us when it is being used or any other extra info or screenshot on how the outcome will be?

thanks again

Mike, can you send me your skype id in private, so i can share my screen and show you how the outcome will be.

sure but not today paulomarcelo, i’m away from my usual PC these days :slight_smile:

I just wondered because this post seem important and noticed it by chance, nobody answered or gave feedback or tested!? don’t know why

While I’m sure many of us will appreciate the results indeed

How about a screenshot to add to the post, so we all know what is expected

I too would find this useful - can it be explained in general terms?

:slight_smile:

Yes, I would love to see something too. Thanks.

@MikeDE - thanks for finding this.

[QUOTE=MikeDE;33269]I just wondered because this post seem important and noticed it by chance, nobody answered or gave feedback or tested!? don’t know why

[/QUOTE]

In my case I’m very busy and out of spare time last month…for this reason my posts are very casuals