ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Progress Bar control
  • Overview
  • Making the progress bar change
  • Non-symmetric progress bar (linear or circular)
  • Symmetric progress bar
  • Non-symmetric linear horizontal progress bar
  • Retrieving the position of the progress bar
  • Modifying the position of the progress bar
  • Properties specific to Progress Bar controls
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
A Progress Bar control can be handled programmatically. To do so, use the variable of the Progress Bar control in the code.
The variable of the Progress Bar control:
  • corresponds to the name of the Progress Bar control.
  • is initialized with the position of the progress bar.
Making the progress bar change
Windows

Non-symmetric progress bar (linear or circular)

The progress is performed from the lower bound to the upper bound.
FOR I = PROGBAR_ProgBar1.MinValue _TO_ PROGBAR_ProgBar1.MaxValue
PROGBAR_ProgBar1 = I
END
Windows

Symmetric progress bar

The progress is performed as follows:
FOR I = 2 * PROGBAR_ProgBar1.MinValue - PROGBAR_ProgBar1.MaxValue _TO_ PROGBAR_ProgBar1.MaxValue
PROGBAR_ProgBar1 = I
END
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Non-symmetric linear horizontal progress bar

Several methods can be used to make a progress bar change in WEBDEV:
  • Method 1: Process ProgressBar in server code. The progress bar is refreshed in browser code by ProgressBarEnable.
    Caution: This code must not be used in server processing in Ajax mode..
    Example:
    // -- Server code of BTN_Process button
    FOR I = PROGBAR_NoName1.MinValue _TO_ PROGBAR_NoName1.MaxValue
    PROGBAR_NoName1 = I
    Multitask(-1)
    END

    // -- Browser code of BTN_Process button
    ProgressBarEnable(PROGBAR_NoName1, 10)

    PHP Note: This method is not available in PHP or AWP.
  • Method 2 (method for AWP pages): Process the ProgressBar in browser code using the ProgressBarExecute function.. This function regularly calls a browser WLanguage procedure used to manage the progression of the progress bar. If a server process must be performed, AJAXExecute must be used in the browser procedure.
    Attention: To display a ProgressBar, a large server or browser process must be broken down into several processes.. This method is recommended for the small repetitive processes (a process that must be performed for a set of images for example).
    Example:
    // -- Browser code
    ProgressBarExecute(PROGBAR_1, UPD_ProgBar, 0, 100, 10)

    // Browser procedure called by ProgressBarExecute
    PROCÉDURE UPD_ProgBar(nValue)
    // Optional code used to perform a server process
    AJAXExécute(ServerProcess)

    PHP Remark: This method is available in PHP and AWP.
Remarque: Several functions can be used to manipulate a ProgressBar in a WEBDEV page. For more details, see Progress bar functions.
Retrieving the position of the progress bar
To retrieve the position of a progress bar, use the following syntax:
<Position> = <Progress Bar control>
<Position> is an integer variable.
Note: It's also possible to use the Value property.
Modifying the position of the progress bar
To modify the position of a progress bar, use the following syntax:
<Progress Bar control> = <Value>
<Valeur> is a value between the minimum and maximum value of the ProgressBar.. These values have been described in the control description window or programmatically with the MinValue and MaxValue properties.
Note: It's also possible to use the Value property.
Properties specific to Progress Bar controls
The following properties are used to manipulate a Progress Bar control programmatically.
BackgroundImageAllows you to get and change the background image of a Progress Bar control.
HorizontalAlignmentAllows you to get and change the horizontal alignment of the percentage of progress displayed in the Progress Bar control.
ImageAllows you to get and change the progress image of a Progress Bar control.
MaxValueAllows you to get and change the upper bound of a Progress Bar control.
MinValueAllows you to get and change the lower bound of a Progress Bar control.
TextProgressBarAllows you to get and change the text displayed in a Progress Bar control (instead of the percentage).
VerticalAllows you to know whether the progress bar is horizontal or vertical.

For a complete list of WLanguage properties that can be used with Progress Bar controls, see Progress Bar control properties.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help