Skip to main content
AGama.1
Associate II
December 29, 2020
Solved

How can I resize the "circle progress" from TouchGFX Designer or even after generating the code from the designer ???

  • December 29, 2020
  • 1 reply
  • 990 views

I tried to modify the ViewBase file generated by the designer by adjusting the width and height of the circle progress but nothing happened and I could not resize this element at all. So Is there is any other method to have different sizes of the circle progress either before generating the code from the designer or even after generating it by modifying some other code ???

This topic has been closed for replies.
Best answer by MM..1
void Screen1View::setupScreen()
{
 Screen1ViewBase::setupScreen();
 
 circleProgress1.setXY(183, 94);
 circleProgress1.setProgressIndicatorPosition(0, 0, 184, 184);
 circleProgress1.setRange(0, 100);
 circleProgress1.setCenter(92, 92);
 circleProgress1.setRadius(90);
 circleProgress1.setLineWidth(0);
 circleProgress1.setStartEndAngle(0, 360);
 circleProgress1.setBackground(touchgfx::Bitmap(BITMAP_BLUE_PROGRESSINDICATORS_BG_LARGE_CIRCLE_INDICATOR_BG_FULL_ID));
 circleProgress1Painter.setColor(touchgfx::Color::getColorFrom24BitRGB(156, 63, 63));
 circleProgress1.setPainter(circleProgress1Painter);
 circleProgress1.setValue(60);
 
circleProgress1.invalidate();
}

You can change all params in screenview.cpp, not in base. And size is defined as background image size, then you need change this image or maybe dont use it.

1 reply

MM..1
MM..1Best answer
Super User
December 29, 2020
void Screen1View::setupScreen()
{
 Screen1ViewBase::setupScreen();
 
 circleProgress1.setXY(183, 94);
 circleProgress1.setProgressIndicatorPosition(0, 0, 184, 184);
 circleProgress1.setRange(0, 100);
 circleProgress1.setCenter(92, 92);
 circleProgress1.setRadius(90);
 circleProgress1.setLineWidth(0);
 circleProgress1.setStartEndAngle(0, 360);
 circleProgress1.setBackground(touchgfx::Bitmap(BITMAP_BLUE_PROGRESSINDICATORS_BG_LARGE_CIRCLE_INDICATOR_BG_FULL_ID));
 circleProgress1Painter.setColor(touchgfx::Color::getColorFrom24BitRGB(156, 63, 63));
 circleProgress1.setPainter(circleProgress1Painter);
 circleProgress1.setValue(60);
 
circleProgress1.invalidate();
}

You can change all params in screenview.cpp, not in base. And size is defined as background image size, then you need change this image or maybe dont use it.