cancel
Showing results for 
Search instead for 
Did you mean: 

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

AGama.1
Associate II

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 ???

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief II
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.

View solution in original post

1 REPLY 1
MM..1
Chief II
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.