# gProgressBar

Definition: | include xpGUI.e gdx id = gProgressBar(string attributes="", dword_seq args={})
Description: | Creates a progress bar control. Shows a percent value that can be updated to simulate a progression. For more information on the attributes and args parameters see gSetAttributes(). Returns: the identifier of the created element.
pwa/p2js: | Supported.
Example: |
    -- demo\xpGUI\gProgressBar.exw
    include xpGUI.e
    gdx pbar
    atom f = 0

    procedure action(gdx timer)
        f += 0.1
        gSetAttribute(pbar,"VALUE",f)
        if f>=1 then
            gSetAttribute(timer,"RUN",false)
        end if
    end procedure

    pbar = gProgressBar()
    gdx hbox = gHbox({pbar},"MARGIN=9x9"),
        dlg = gDialog(hbox,"gProgressBar",`SIZE=240x80`),
        timer = gTimer(action,1000,true)
    gShow(dlg)
    gMainLoop()
Notes: | Some examples can be seen in demo\xpGUI\sample.exw |
Attributes: |
? MAX | (non inheritable) Contains the maximum value. Default is "1". The control display is not updated, must set VALUE attribute to update.
? MIN | (non inheritable) Contains the minimum value. Default is "0". The control display is not updated, must set VALUE attribute to update.
? ORIENTATION | (creation only) can be "VERTICAL" or "HORIZONTAL". Default: "HORIZONTAL". Horizontal goes from left to right, and vertical from bottom to top.
? SIZE | The initial size is defined as "200x30". Set to NULL to allow the use of smaller values in the layout computation.
VALUE | (non inheritable) Contains a number between "MIN" and "MAX", controlling the current position.
also | ACTIVE, EXPAND, FONT, MARGIN, TIP, SIZE, VISIBLE.