VProgressBar control

You can use a progress bar to indicate the progress of a lengthy operation, such as an installation program that copies a large number of files. The VProgressBar control is a vertical rectangle that fills with the system highlight color as the operation progresses.

Properties

VProgressBar property

Datatype

Description

AccessibleDescription

String

A description of the control and/or its purpose for use by accessibility tools such as readers for visually impaired users.

AccessibleName

String

A label that briefly describes the control, such as the text in a button or the name of a menu item.

AccessibleRole

AccessibleRole (enumerated)

Describes what kind of user interface element the control is.

BringToTop

Boolean

Specifies whether PowerBuilder moves the control to the top of the front-to-back order. Values are:

  • TRUE – Control moved to top.

  • FALSE – Control not moved to top.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

DragAuto

Boolean

Specifies whether PowerBuilder puts the control automatically into Drag mode. Values are:

  • TRUE – When the control is clicked, the control is automatically in Drag mode.

  • FALSE – When the control is clicked, the control is not automatically in Drag mode. You have to manually put the control into Drag mode by using the Drag function.

DragIcon

String

Specifies the name of the stock icon or the file containing the icon you want to display when the user drags the control (the ICO file). The default icon is a box the size of the control.

When the user drags the control, the icon displays when the control is over an area in which the control can be dropped (a valid drop area). When the control is over an area that is not a valid drop area, the No-Drop icon displays.

Height

Integer

Specifies the height of the control, in PowerBuilder units.

MaxPosition

Unsigned Integer

Specifies the value of the Position property when the progress bar is at the top of the control. This value can be different from the end of the control’s range, set with the SetRange function.

The default value is 100.

MinPosition

Unsigned Integer

Specifies the value of the Position property when the progress bar is at the bottom of the control. This value can be different from the start of the control’s range, set with the SetRange function.

The default value is 0.

Pointer

String

Specifies the name of the stock pointer or file containing the pointer used for the control.

Position

Integer

Specifies the value of the current position within the range of the control (set with the SetRange function). The control uses the range and the current position to determine the percentage of the progress bar to fill with the highlight color.

SetStep

Integer

Specifies a step increment for the progress bar. The default is 10.

SmoothScroll

Boolean

Specifies that the control displays as a smooth scrolling bar instead of the default segmented bar.

TabOrder

Integer

Specifies the tab value of the control within the window (0 means the user cannot tab to the control).

Tag

String

Specifies the tag value assigned to the control.

Visible

Boolean

Specifies whether the control is visible. Values are:

  • TRUE – Control is visible.

  • FALSE – Control is not visible.

Width

Integer

Specifies the width of the control, in PowerBuilder units.

X

Integer

Specifies the X position (the distance from the left edge of the window), in PowerBuilder units.

Y

Integer

Specifies the Y position (the distance from the top of the window), in PowerBuilder units.

Events

VProgressBar event

Occurs

Clicked

When the left mouse button is pressed on the control

Constructor

Immediately before the Open event occurs in the window

Destructor

Immediately after the Close event occurs in the window

DoubleClicked

When the left mouse button is double-clicked on the control

DragDrop

When a dragged control is dropped on the control

DragEnter

When a dragged control enters the control

DragLeave

When a dragged control leaves the control

DragWithin

When a dragged control is within the control

GetFocus

Just before the control receives focus (before it is selected and becomes active)

Help

When the user presses the F1 key or drags the context help button (question mark) from the title bar to a menu item or control

LoseFocus

When the control loses focus (becomes inactive)

Other

When a Windows message occurs that is not a PowerBuilder event

RButtonDown

When the right mouse button is pressed on the control

Functions

VProgressBar function

Datatype returned

Description

ClassName

String

Returns the name assigned to the control

Drag

Integer

Starts or ends the dragging of the control

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service

GetParent

PowerObject

Returns a reference to the name of the parent object

Hide

Integer

Makes the control invisible

Move

Integer

Moves the control to a specified location

OffsetPos

Integer

Moves the control’s current position by the amount specified

PointerX

Integer

Returns the distance of the pointer from the left edge of the control

PointerY

Integer

Returns the distance of the pointer from the top of the control

PostEvent

Boolean

Adds an event to the end of the message queue for the control

Print

Integer

Prints the control

Resize

Integer

Changes the size of the control

SetFocus

Integer

Sets the focus to the control

SetPosition

Integer

Specifies the position of the control in the front-to-back order of the window

SetRange

Integer

Sets the range of the control. The control uses the range and the current position to determine the percentage of the progress bar to fill with the highlight color

SetRedraw

Integer

Controls automatic redrawing of the control after each change in its properties

Show

Integer

Makes the control visible

StepIt

Integer

Moves the control’s current position by the amount specified by the value of the SetStep property

TriggerEvent

Integer

Triggers a specified event in the control and executes the script for the event

TypeOf

Object

Returns the type of the control