The PROGRESS control is the WIL Dialog implementation of the Progress Bar Windows Common Control. It can be used to display the progress of a lengthy operation performed inside a WIL Dialog user-defined callback procedure.
The minimum and maximum positions of the bar within the control is called the range and distance of each incremental movement of the bar is called the step. The default control range is 0 to 100 and the default control step is 10.
By default the control moves the bar from left to right but it can also be modified to move the control's bar from bottom to top.
Return Value:
The control does not use a control variable and, therefore, does not return and information when the dialog id dismissed
Control Definition:
<dlg-variable>nn =`x, y, width, height, type, control-name, DEFAULT, range-step, DEFAULT, tab-order, style, DEFAULT, barcolor, backgroundcolor`
For Example:
MyDialog003=`055,025,072,012,PROGRESS,"Progress_1",DEFAULT
,DEFAULT,DEFAULT,30,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Attribute
|
Value
|
Meaning
|
dlg-variable
|
MyDialog
|
The name of the dialog box.
|
nn
|
003
|
The ordinal position of the control in the dialog box (starting with 1).
|
x
|
055
|
The horizontal coordinate of the upper left corner of the control in Dialog Units.
|
y
|
025
|
The vertical coordinate of the upper left corner of the control in Dialog Units.
|
width
|
072
|
The width of the control in Dialog Units.
|
height
|
012
|
The height of the control in Dialog Units.
|
type
|
PROGRESS
|
The type of control.
|
control-name
|
"Progress_1"
|
The name used to identify the control in a user defined callback procedure. The name cannot be more than 30 characters in length and MUST be unique. ( This attribute can only be used with 6.2 or later dialog formats. )
|
variable
|
DEFAULT
|
Not applicable to this control.
|
text
|
"DEFAULT"
|
The text attribute is used to indicate the range and step increment of the control's bar image. Specifying 'DEFAULT' or using an empty string causes the control to use the 0|100|10 range and step. The range and step consists of 3 integer values separated by vertical bars(|). The first number indicates the minimum position, the second the maximum position, and third how much the bar moves with each step.
|
value
|
DEFAULT
|
Not applicable to this control.
|
tab-order
|
30
|
Allows you to specify a control's tab order independently of a control's position or name in the dialog template. Tab-order controls the order in which controls are accessed when the keyboard is used to navigate the dialog. It also influences which control is on top when controls have overlapping positions in the dialog. It can be any positive integer, but each control should have a unique number.
When you navigate through a dialog using the tab key, lower number controls will be given the keyboard focus before higher controls. Likewise, low-numbered overlapping controls will appear on top of higher numbered controls. If you specify the DEFAULT keyword for this attribute or if you give two controls the same tab order, a tab order will be arbitrarily assigned to the control.
Note: The dialog function, under certain circumstances, may change the tab order you specify. The GROUPBOX controls tab order may be adjusted so that it is smaller than any of the controls it contains. In addition, the tab order of the controls inside the GROUPBOX may be adjusted so that they are consecutive.
|
style
|
DEFAULT
|
Allows you to control the initial appearance and behavior of your control. Numbers represent each style and they can be combined, using the bit-wise OR (|) operator, to set multiple styles. The following table lists the style numbers, their meanings, and the controls that they have an effect on.
Style
|
Meaning
|
@csInvisible (1)
|
Control is invisible
|
@csDisabled (2)
|
Control has disabled so that it does not accept any user input. Since the PROGESS control does not accept user input this style only affects the control's context menu when you add one to the control
|
@csVertical (16384)
|
Causes the control's bar to move from bottom to top instead of left to right.
|
Note: Specifying 0 for this attribute is equivalent to using the DEFAULT keyword and means that the control will exhibit default behavior.
|
font
|
DEFAULT
|
Not applicable to this control.
|
textcolor
|
DEFAULT
|
Sets the color of the bar element of the control. Color is specified by three vertical bar (|) delimited numbers ranging from 0 to 255 or a single hexadecimal number preceded by the letter 'h'. The numbers represent one of the RGB colors: red, green or blue, in that order. The complete color specification must be surrounded by double quotes (") unless the DEFAULT key word is used. If this attribute is set to DEFAULT, the color listed in the main dialog's textcolor will be used. If a color is not specified for the dialog, the system default color is used. This attribute may be ignored if the system has Windows Themes enable.
|
backgroundcolor
|
DEFAULT
|
Sets the color of the area of the control not covered by the bar element of the control. Color is specified by three vertical bar (|) delimited numbers ranging from 0 to 255 or a single hexadecimal number preceded by the letter 'h'. The numbers represent one of the RGB colors (red, green or blue, in that order). The complete color specification must be surrounded by double quotes (") unless the DEFAULT keyword is used. If no color is specified or the DEFAULT keyword is used, the system background color will be used. This attribute may be ignored if the system has Windows Themes enable.
|
|
Event Options
Use the DialogProcOptions function to control when your User-Defined-Callback procedure is called by its associated dialog. You can also use it to control your dialog's behavior, while your procedure is executing. You usually establish callback events during the first call to the procedure i.e., event 0, but this can be done during any call.
Event-Option-Code Values
|
Meaning
|
N/A
|
No events option are applicable to this control.
|
Dialog Callback Procedure Function Options
DialogControlGet function returns text and state information associated with a control.
Request
|
Meaning
|
|
Request code to obtain the date/time as text in the format displayed by the control.
|
@dcBackColor (11)
|
Background color specified by three vertical bar (|) delimited numbers ranging from 0 to 255. If the control is using the system default color, the string "DEFAULT" is returned.
|
@dcTextColor (13)
|
Text color specified by three vertical bar (|) delimited numbers ranging from 0 to 255. If the control is using the dialog's default text color, the string "DEFAULT" is returned.
|
@dcMenuNames (18)
|
Tab delimited list of menu item names associated with the control, menu item or menu bar.
|
@dchWnd (19)
|
Window handle of a dialog control.
|
@dcBarPos(32)
|
Gets the current position of the control in step units relative to the bar range.
|
@dcBarLimits(33)
|
Returns vertical bar(|) delimited list of the low and high range, and the step of the controls bar.
|
DialogControlSet function changes the range, position, or appearance of a control.
Request
|
Meaning
|
@dcBackColor (11)
|
Background color. The color is specified by three vertical bar (|) delimited numbers ranging from 0 to 255 or a single hexadecimal number preceded by the letter 'h'. To give the control the system default background color, use an empty string ""or the "DEFAULT "key string for this parameter.
|
@dcTextColor (13)
|
Text color. The color is specified by three vertical bar (|) delimited numbers ranging from 0 to 255 or a single hexadecimal number preceded by the letter 'h'. To give the control the dialog's default text color, use an empty string ""or the "DEFAULT "key string for this parameter
|
@dcBarPos(32)
|
Sets the current position of the control in step units relative to the bar range. Use -1 for the position to move the bar one step either towards the right or towards the top.
|
@dcBarLimits(33)
|
Sets the low and high range, and the step of the control's bar Specify the numbers as a vertical bar(|) delimited list of the low and high range and the step of the controls bar. Changing these limits may cause the control to redraw and start over from the low limit.
|
DialogControlState function changes a control’s style.
Style
|
Meaning
|
@csInvisible (1)
|
Control is invisible
|
@csDisabled (2)
|
Control has disabled appearance and does not accept any user input, it would otherwise accept input.
|
@csVertical(16384) *
|
The control's bar moves from bottom to top instead of left to right when set.
|
* The DialogControlState request code @dcsGetStyle can be used to determine whether or not the @csVertical style is set for the PROGRESS control However, the @dcsRemStyle or @dcsAddStyle request codes cannot be used to change the @csVertical style. The @dcsRemStyle or @dcsAddStyle request codes can be used to change the PROGRESS control's @csInvisible and @csDisabled styles.
|
§ Dialog
§ Dialog Overview
§ Defining the Dialog
§ Defining the Dialog Controls
§ Dialog Control Types
§ Dynamic Dialogs
§ InternetExplorer Controls
§ Dialog Units
§ Dialog Fonts
Control Types
§ Calendar
§ Checkbox
§ ComControl
§ DateTime
§ DropListbox
§ Editbox
§ FileListbox
§ Groupbox
§ Itembox
§ MenuBar
§ MenuItem
§ MultiLinebox
§ Picture
§ PictureButton
§ Progress
§ PushButton
§ RadioButton
§ ReportView
§ Spinner
§ StaticText
§ VaryText
|