KSprbar™ Template gives Clarion user an easy access to the standard MS
Windows ProgressBar control.
KSprbar™ can be used in Clarion4, Clarion5 or Clarion5.5 32-bit applications.
With the help of the templates you will be able to handle standard Windows
32-bit ProgressBar control in a "Clarion Way". Templates support
changing style of the ProgressBar, placing ProgressBar control on a Process
window, autoresizing, changing ProgressBar orientation and color and many other
features. KSprbar™ Template is designed to work together with the KSprbar™
Template so the progress control can be placed in a Status Bar section. Check
out our KSBarPack option.
The common controls are a set of windows that are implemented by the common control library, which is a dynamic-link library (DLL) included with the Microsoft® Windows® operating system. Like other control windows, a common control is a child window that an application uses in conjunction with another window to perform I/O tasks.
A progress bar is a window that an application can use to indicate the progress
of a lengthy operation. It consists of a rectangle that is gradually filled with
the system highlight color as an operation progresses. The following
illustration shows a progress bar positioned along the bottom of a window:
Register the templates:
The KSprbar™ Setup Program can automatically register
the templates. If you do not wish to register the templates automatically you
will have to register them manually.
Start Clarion, select "Template registry" from the "Setup"
menu. When the "Template registry" window opens, select the "Register"
button on the right. Then you are prompted for a filename. Select KSprbar.tpl (for
both ABC and Legacy templates). These files are located in your TEMPLATE folder.
After registering your Template Registry window will look like:
Register the templates:
To add Progress Bar to your application use Extension Templates and Control Templates.Progress Bar Control Template
This control template is used to put Progress Bar control on a Window.
(The images below show the template prompts
for the KSprbar™ control template.
You can find the detailed description in tables below)
KSprbar TAB:
Prompt | Description |
Orientation | Select the orientation of the progress bar control. If vertical the progress bar displays progress status vertically, from bottom to top. |
Range From | A value or variable that represents the low limit to be set for the progress bar control. |
Range To | A value or variable that represents the high limit to be set for the progress bar control. |
Smooth | If checked the progress bar displays progress status in a smooth scrolling bar instead of the default segmented bar. |
Enable Bar Color | If checked you can specify the new progress indicator bar color. |
Enable Bckr. Color | If checked you can specify the new progress indicator background color. |
Sheet and Tabs TAB:
Prompt | Description |
Attached to the Tab | Enable this check box if you put your progress bar control on a Tab. |
Sheet | Select Sheet Control. |
Tab number | Indicate Tab Number. |
Object Name TAB:
Prompt | Description |
KSprbar Object Name | Name of KSprbar Control Object in the source code. |
KSprbar Control | Name of the KSprbar Control in a source code. |
Progress Bar in a Process Window Extension Template
With the help of this extension template you can replace standard Clarion progress bar control for a Process procedure with the KSprbar control.
KSprbar TAB:
Prompt |
Description |
Progress Control Name |
Name of the Clarion progress control to be replaced with the KSprbar control. |
Orientation |
Select the orientation of the progress bar control. If vertical the progress bar displays progress status vertically, from bottom to top. |
Range From |
A value or variable that represents the low limit to be set for the progress bar control. |
Range To |
A value or variable that represents the high limit to be set for the progress bar control. |
Smooth |
If checked the progress bar displays progress status in a smooth scrolling bar instead of the default segmented bar. |
Enable Bar Color |
If checked you can specify the new progress indicator bar color. |
Enable Bckr. Color |
If checked you can specify the new progress indicator background color. |
Object Name TAB:
Prompt |
Description |
KSprbar Object Name |
Name of KSprbar Control Object in the source code. |
KSprbar Control |
Name of the KSprbar Control in a source code. |
Progress Bar in a Status Bar Extension Template
With the help of this extension template you can place
KSprbar control in a section of KSstbar control. You need to have KSstbar
templates registered.
Prompt |
Description |
KSprbar Object Name |
Name of KSprbar Control Object in the source code. |
Orientation |
Select the orientation of the progress bar control. If vertical the progress bar displays progress status vertically, from bottom to top. |
Range From |
A value or variable that represents the low limit to be set for the progress bar control. |
Range To |
A value or variable that represents the high limit to be set for the progress bar control. |
Smooth |
If checked the progress bar displays progress status in a smooth scrolling bar instead of the default segmented bar. |
Enable Bar Color |
If checked you can specify the new progress indicator bar color. |
Enable Bckr. Color |
If checked you can specify the new progress indicator background color. |
Put on Status Bar Part |
Status Bar part number where control will be located. |
Margins |
Top/Bottom margins of the progress bar control. |
Status Bar Object Name |
Name of KSstbar Control Object in the source code. |
This table lists the KSprbar™ Properties and Methods.
Name |
Type |
Description |
Properties |
|
|
Other Properties |
|
All other properties are private and should be used with this template. If you want to use this class without template please look at the template generated code and copy it to your source. |
Methods |
|
|
Kill |
PROCEDURE() |
Kills and deinitializes the KSprbar™ control. |
CreateProgressBar |
PROCEDURE (LONG left, LONG Top, LONG Width, LONG Height, <LONG ParentHandle>),LONG,PROC |
Creates KSprbar™ control. Parameters: |
ResizeProgressBar |
PROCEDURE (LONG left, LONG Top, LONG Width, LONG Height) |
Resizes the KSprbar™ Control to the new coordinates. Parameters: |
SetRange |
PROCEDURE(LONG MinVal, LONG MaxVal) |
Sets the minimum and maximum values for a progress bar. Parameters: |
SetProgressPosition |
PROCEDURE(LONG NewPos) |
Sets the current position for a progress bar. Parameters: |
ClearProgress |
PROCEDURE() |
Clears the Progress Bar. |
SetBarColor |
PROCEDURE(LONG BarColor) |
Sets the color of the progress indicator bar in the progress bar control. Parameters: |
SetBKColor |
PROCEDURE(LONG BKColor) |
Sets the background color in the progress bar. Parameters: |
Hide/Unhide |
PROCEDURE() |
Hides/Unhides progress bar control. |
Enable |
PROCEDURE(BYTE Enable) |
Enables or Disables KSprbar™ Control |
SetFocus |
PROCEDURE() |
Sets focus to the control. |
The following files will be copied to your hard disk during installation. All the pathnames are relative to your Clarion root directory (e.g. C:\CLARION5, C:\C55), depending on your choice during installation.
Directory |
File Name |
Definition |
Example\KS\KSprbar |
Clarion.ico |
KSprbar™ Demo Applications |
KS\KSprbar |
KSprbar.htm |
This documentation and images. |
Lib |
KScomct.lib |
Library (to link Clarion with Windows API) |
Libsrc |
KSprbar.inc |
KSprbar™ Class Defenition |
Template |
KSLogo.bmp |
Template and templates image files. |
For support, please write to Support@klarisoft.com
For updates of this product please visit http://www.klarisoft.com
regularly.