Welcome! Log In Create A New Profile

Advanced

Displaying a progressbar

Posted by Piet van Zanten 
Piet van Zanten
Displaying a progressbar
December 30, 2011 10:32PM
Hi,

It may take some time to figure out how to display a progressbar in Webdev.
Here's a howto for Webdev 16 using the new gauge functions :

1. Create an invisible cell below your page and put a progressbar on it. It may also contain other controls, e.g. a static text and/or an image. Use a nice rounded shape for the cell e.g.:
Border color: White
Background color: Button background
Shape: Rounded diffuse - Linear_Vertical

Let's say the cell is named "WaitCell" and your progressbar is called "PROGBAR_NoName1".

2. In the button that starts the server procedure you activate the progressbar.
In the Click code (Browser):
CellDisplayDialog(WaitCell)  //check the other possible parameters for this function.
GaugeActivate(PROGBAR_NoName1,50)
(the 50 is the time in hundreds of seconds between refreshing the progressbar from the server. Don't set this time too short, to avoid too many requests.

3. In the button Click code (Server) there's your server procedure:
i is int
PROGBAR_NoName1..MaxValue=HNbRec(MyFile)
TableDeleteAll(Table_Table1)
FOR ALL MyFile_or_Query ON MyKey
   i++
   PROGBAR_NoName1=i
   Multitask(-1)
   //do your processing here
   TableAddLine(blablabla)
END
PROGBAR_NoName1=0  //reset to zero for next time
That's it. Looks very nice with the DDW and all.

Regards,
Piet

Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: