home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
zeryxvp.zip
/
VPZXPBAR.HLP
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
2000-05-26
|
6KB
|
204 lines
ΓòÉΓòÉΓòÉ 1. Overview of Progress bar ΓòÉΓòÉΓòÉ
This object was developped with help from Ulrich MФller the creator of XFolder
and XWorkPlace.
The need for a decent progress bar API under OS2 as been unanswered for too
long, following Ulrich call to do what IBM and others did not do, i created
this object for Vipro Rexx and C. Now i am using for my software, and i am
giving this to all who want to improve OS2 by programming for it.
This program is under GPL and no garanties are given use at your risk. for
information email to: elavoie@zeryx.com or go to http://www.zeryx.com.
ΓòÉΓòÉΓòÉ 2. Style page for the Progress bar ΓòÉΓòÉΓòÉ
There are several styles available for the Progress bar object. You can set the
styles using the style page or by using the methods associated with each style.
Basic
Tab stop
Allows the user to tab to the Progress bar. It is a good idea to provide a tab
stop for the first Progress bar in a group.
Group
Allows the user to move within a group of objects using the arrow keys. Select
Group if this Progress bar is the only object in a group or if it is the first
object in a group.
Disabled
The Progress bar is present, but the user cannot select it.
Visible
The user can see the Progress bar.
Other Styles
PERCENT
Set progress bar as a percent display
NUMERIC
Set progress bar as a numeric display
BUTTONSTYLE
Give the progress bar a Button relief style
ΓòÉΓòÉΓòÉ 3. Methods for Progress bar ΓòÉΓòÉΓòÉ
The Progress bar supports the following methods:
Update percent bar
Updates the progress with a min and max value
Set PERCENT style
Turn on the PERCENT style option.
Get PERCENT style flag
Query if the percent style is on.
Set NUMERIC style
Turn on the NUMERIC style option.
Get NUMERIC style flag
Query if the numeric style is on.
ΓòÉΓòÉΓòÉ 3.1. Update percent bar ΓòÉΓòÉΓòÉ
Description
Updates the progress it sets the current progress and the overall scale of the
progress bar.
REXX Statement:
rc=VpZxPBar(window, %s, 'UPDVALUE',current_pos,max)
Parameters:
This function is used to update the progress in the status bar.
You have to give the current value of the progress and the maximum of the scale
(max). If a percent display is selected the value current_pos is divided by the
value max and multiplied by 100. If the display is set at numeric then the
current_pos value will be displayed, the max value will determine the scale of
the progress bar.
Some validation are made to avoid errors, if max is at 0 then min is set to 0
and max to 1.
window
The form in which the object resides. Also known as the window Handle
itemid
The numeric ID or the symbolic name of the object.
UPDVALUE
The method identifier. This must be the literal string.
current_pos
Current pos for the progress indicator.
max
The maximum of the scale, it can be changed on each call
Returns:
Allways returns 0.
ΓòÉΓòÉΓòÉ 3.2. Get PERCENT style flag ΓòÉΓòÉΓòÉ
Description
Query the status of the PERCENT style option. The PERCENT style Set progress
bar as a percent display
REXX Statement:
flag=VpZxPBar(window, itemid, "GETPERCENT)"
Parameters:
window
The form in which the object resides.
itemid
The numeric ID or the symbolic name of the object.
GETPERCENT
The method identifier.
Returns:
flag
1 if style is set, else 0.
ΓòÉΓòÉΓòÉ 3.3. Set PERCENT style ΓòÉΓòÉΓòÉ
Description
Turn on the PERCENT style option. The PERCENT style Set progress bar as a
percent display
REXX Statement:
CALL VpZxPBar window, itemid, "SETPERCENT"
Parameters:
Purpose
window
The form in which the object resides.
itemid
The numeric ID or the symbolic name of the object.
SETPERCENT
The method identifier.
ΓòÉΓòÉΓòÉ 3.4. Get NUMERIC style flag ΓòÉΓòÉΓòÉ
Description
Query the status of the NUMERIC style option. The NUMERIC style Set progress
bar as a numeric display
REXX Statement:
flag=VpZxPBar(window, itemid, "GETNUMERIC)"
Parameters:
Purpose
window
The form in which the object resides.
itemid
The numeric ID or the symbolic name of the object.
GETNUMERIC
The method identifier.
Returns:
flag
1 if style is set, else 0.
ΓòÉΓòÉΓòÉ 3.5. Set NUMERIC style ΓòÉΓòÉΓòÉ
Description
Turn on the NUMERIC style option. The NUMERIC style Set progress bar as a
numeric display
REXX Statement:
CALL VpZxPBar window, itemid, "SETNUMERIC"
Parameters:
Purpose
window
The form in which the object resides.
itemid
The numeric ID or the symbolic name of the object.
SETNUMERIC
The method identifier.