KSprbar™ Documentation

Contents


About KSprbar™ Template

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.

KSprbar™ Template is a pure Clarion source (no dll or lib black boxes) based on the ABC/Legacy compliant ProgressBar class! Start using the templates and give you Clarion applications native MS Windows 32-bit look.
 

About ProgressBar Control

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:


Getting started

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.
After you added Progress Bar you can use ProgressBar Class Properties and Methods to handle the Progress Bar.


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.

  


Class description

This table lists the KSprbar™ Properties and Methods.

Name  

Type 

Description

Properties
  
FrameClass

  
  
StatusBar

  
  
Use this property to call Frame Window Status Bar methods.

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
  
Init 

  
  
PROCEDURE()

  
  
Initializes the KSprbar™ control.

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:
Left:      left position of a progress bar
Top:      top position of a progress bar
Width:   width of a progress bar
Height:   height of a progress bar
ParentHandle:   Parent window handle for a progress bar

ResizeProgressBar

PROCEDURE (LONG left, LONG Top, LONG Width, LONG Height)

Resizes the KSprbar™ Control to the new coordinates.

Parameters:
Left:      left position of a progress bar
Top:      top position of a progress bar
Width:   width of a progress bar
Height:   height of a progress bar

SetRange

PROCEDURE(LONG MinVal, LONG MaxVal)

Sets the minimum and maximum values for a progress bar.

Parameters:
MinVal:  minimum value
MaxVal: maximum value

SetProgressPosition

PROCEDURE(LONG NewPos)

Sets the current position for a progress bar.

Parameters:
NewPos:      new current position for a progress bar

ClearProgress      

PROCEDURE()

Clears the Progress Bar.

SetBarColor

PROCEDURE(LONG BarColor)

Sets the color of the progress indicator bar in the progress bar control.

Parameters:
BarColor:    new progress indicator bar color

SetBKColor

PROCEDURE(LONG BKColor)

Sets the background color in the progress bar.

Parameters:
BKColort:  new background color

Hide/Unhide

PROCEDURE()

Hides/Unhides progress bar control.

Enable

PROCEDURE(BYTE Enable)

Enables or Disables KSprbar™ Control
  
Parameters:
Enable: if True then Enable Control if False then Disable Control

SetFocus

PROCEDURE()

Sets focus to the control.

 


Installed files

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
KSLogo.bmp

KSprbar™ Demo Applications

...

If you install templates for Clarion4 then Clarion4 examples are installed.
If you install templates for Clarion5 then Clarion5 examples are installed.
If you install templates for Clarion5.5 then Clarion5.5 examples are installed.  

KS\KSprbar

KSprbar.htm  
*.gif
  

This documentation and images.

Lib

KScomct.lib
  

Library (to link Clarion with Windows API)

Libsrc

KSprbar.inc
KSprbar.clw
  

KSprbar™ Class Defenition

Template

KSLogo.bmp
KSprbar.tpl
KSprbar.tpw
  

Template and templates image files.

 


Using KSprbar™ without templates

It is possible to use KSprbar™ without templates, but there are some things to consider:
   
You will need to include KSprbar.inc (located in your LIBSRC folder) manually.
 
You will also have to add a .lib file to your project:
Open the "Project editor" window, locate the "Library, object and resource files" entry and press "Add file". Select KScomct.lib file.


Copyright notice

KSprbar™ copyright © 2001 by KlariSoft. All rights reserved.

 


Contacts

For support, please write to Support@klarisoft.com
For updates of this product please visit http://www.klarisoft.com regularly.