i
This document refers to an older version. GeneXus 16 is our latest version.

Progress Indicator

Official Content
This documentation is valid for:

The purpose of the Progress Indicator user control is to be able to show an indicator of the activity of a process (or the progress of the process when the percentage of the advance is known).

Smart Devices apps are all about User Experience (UX), User Interface (UI) and Functionality. The apps have to be constantly interacting with the user, responding to what the user expects and activates with his gestures. Giving the user feedback of the action he triggered is one of the most important features a Smart Device App should have. An app which doesn't give feedback of the actions that are being performed misleads the user into thinking that it may have crashed, or his gesture wasn't properly recognized.

The same happens in web applications, where it is necessary to give feedback to the user in particular for processes which do not send an immediate response.

So Progress Indicator enables the application to give feedback to the user when batch processing is being done.

An External object is included in Genexus so different methods and properties can be used to manage and display this control.

Progress Indicator EO

Properties

Class To assign a Theme class to the control.

Type

The Progress Indicator can be determinate or indeterminate. Determinate indicators show the progress of the processing, while indeterminate ones don't inform you about the status during the process

Title

Main text shown on the progress Indicator

Description

More information shown on the progress indicator screen

MaxValue

This property is used when the Type is Determinate. This property specifies the value for the task completion

Value

When the determinate type is used, this value is the current percentage of the processing task

 Methods

Show

Invokes the progress Indicator screen

ShowWithTitle(title)

Invokes the progress Indicator with a custom title

ShowWithTitleAndDescription(title, description)

Invokes the progress indicator with a custom title and description

Hide

Closes the Progress Indicator screen.

Smart Devices: Every time a Progress Indicator is used, the Hide method is automatically added at the end of the composite block. If you want to set it manually to invisible, you can use the Hide method

Sample code

The API used for Web and Smart Devices is the same.

&ProgressIndicator.Type = ProgressIndicatorType.Determinate
&ProgressIndicator.MaxValue = 100
&ProgressIndicator.Value = 10
&ProgressIndicator.ShowWithTitle("Progress..") //Show ProgressIndicator

//Processing
&ProgressIndicator.Value = 20

//Processing
&ProgressIndicator.Value = 30

//Processing
&ProgressIndicator.Value = 80

//Processing
&ProgressIndicator.Value = 100

//Processing
&ProgressIndicator.Hide()

Progress Indicator for web

The code shown above in case of web applications, has to be included in a Procedure object and this procedure has to be submitted (executed asynchronously) - it should be invoked using the Submit command.

By default, the progress indicator for web is assigned to the GXProgressBar class under the custom nodes of the Theme.
The classes progress-bar-title and progress-bar are descendant of GXProgressBar, and may be customized if necessary by using the Theme editor.

You can make changes to that or create a child node of GXProgressBar and set the class to the control at runtime as follows:

&ProgressIndicator.Class = "progress-bar-success"

ProgressIndicatorClass

See HowTo: Using Progress Indicator in Smart Devices for more information on the use of this control in Smart Devices.

Availability

In GeneXus X Evolution 2 Upgrade 1 it is available for iOS and in GeneXus X Evolution 2 Upgrade 2 for Android and Blackberry.

For web, it is available in GeneXus X Evolution 3.

Requirements


Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.