How can I resize the "circle progress" from TouchGFX Designer or even after generating the code from the designer ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-29 9:39 AM
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 ???
Solved! Go to Solution.
- Labels:
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-29 11:24 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-29 11:24 AM
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.
