Skip to main content

Circle Progress

A Circle Progress shows the current progress by using a Circle as the progress indicator on top of a background Image. The Color, the Alpha and overall parameters regarding the Circle can be configured. It is possible to create a custom background image and change the different parameters of the progress indicator such as the position and the size to fit the custom background image.

Circle Progress running in the simulator

Widget Group

The Circle Progress can be found in the Progress Indicators widget group in TouchGFX Designer.

Circle Progress in TouchGFX Designer


The properties for a Circle Progress in TouchGFX Designer.

Property GroupProperty Descriptions
NameName of the widget. Name is the unique identifier used in TouchGFX Designer and code.
LocationX and Y specify the top left corner of the widget relative to its parent.

W and H specify the width and height of the widget.
The size of a Circle Progress is determined by the size of the selected background image.

Lock specifies if the widget should be locked in its current X, Y, W and H.
Locking the widget also disables interacting with the widget through the screen.

Visible specifies the visibility of the widget. Making the widget invisible also disables interacting with the widget through the screen.
StyleStyle specifies a predefined setup of the widget, that sets select properties to predefined values.
These styles contain images that are free to use.
Image & ColorBackground specifies background image.

Progress specifies either a color or an image to use as fill for the Circle.
ValuesRange Min and Range Max specify the minimum and maximum integer values of the indicator.

Initial specifies the initial value of the progress indicator.Steps Total specifies at what granularity the progress indicator reports new values. For instance, if the progress needs to be reported as 0%, 10%, 20%, ..., 100%, the total value should be set to 10.

Steps Min specifies the minimum steps the progress indicator shows.
AppearanceCenter Position X and Center Position Y specify the center position of the progress circle relative to its Circle Progress parent.

Start & End Angle specify the start and end angle of the drawn Circle.

Radius specifies the size of the progress cirlce.

Line Width specifies the width of the progress circle. If the value is 0, the progress circle is as large as the radius. Otherwise, the width specified will configure the width of the progress circle starting outside and moving inwards.

Cap Style specifies line ending style.

Alpha specifies the transparency of the widget. The alpha value ranges between 0 and 255 for the widget. 0 is fully transparent and 255 is solid.
MixinsDraggable specifies if the widget is draggable at runtime.

ClickListener specifies if the widget emits a callback when clicked.

FadeAnimator specifies if the widget can animate changes to its Alpha value.

MoveAnimator specifies if the widget can animate changes to X and Y values.


The actions and triggers supported by the Circle Progress are described in the following sections.


Widget specific actionsDescription
Set valueSet the value of the progress indicator.
Standard widget actionsDescription
Move widgetMove a widget to a new position over time.
Fade widgetModify alpha value of widget over time.
Hide widgetHides a widget (sets visibility to false).
Show widgetMake a hidden widget visible (sets visibility to true).


Value update completeWill be triggered when an update animation is completed. If duration of the update is 0 the update will happen instantly but will still trigger this event.
Value updatedWill be triggered for both instant updates and intermediate steps during an update animation. Will only trigger when the new value differs from the current one.


A Circle Progress consists of a Circle and a background Image. The Circle is based on the CanvasWidget and is heavily dependent on the MCU for rendering. Therefore, the Circle Progress is considered a demanding widget on most platforms.

For more details on CanvasWidget drawing performance, read the General UI Component Performance section.


Generated Code

In the generated code for the View base class we can see how TouchGFX Designer sets up a Circle Progress.

circleProgress.setXY(188, 84);
circleProgress.setProgressIndicatorPosition(0, 0, 104, 104);
circleProgress.setRange(0, 100);
circleProgress.setCenter(52, 52);
circleProgress.setStartEndAngle(0, 360);

User Code

The following example illustrates how to implement the handleTickEvent() function to simulate progress. Running this code creates the application shown at the beginning of this article.

class Screen1View : public Screen1ViewBase
virtual ~Screen1View() {}
virtual void setupScreen();
virtual void tearDownScreen();
virtual void handleTickEvent();
bool increase = true;
void Screen1View::handleTickEvent()
int currentValue = circleProgress.getValue();
int16_t max;
int16_t min;
circleProgress.getRange(min, max);

if (currentValue == min)
increase = true;
else if (currentValue == max)
increase = false;

int nextValue = increase == true ? currentValue+1 : currentValue-1;

You can use these functions and the others available in the CircleProgress class in user code. Remember to force a redraw by calling circleProgress1.invalidate() if you change the appearance of the widget.

TouchGFX Designer Examples

To further explore the Circle Progress, try creating a new application within TouchGFX Designer with the following UI template:

Progress Indicator Example UI template in TouchGFX Designer

API Reference