Add Widgets, line, etc. at run time
Hello, is it possible to add for example a line on the canvas at run time? I'm managing to do a log x scale providing the decades separators with a Line object, but my plot could have more than one decade, so i think is a terrible idea to add many lines as i want, and then making each one visible as it is required. So a tried to add lines at run time but i couldn't manange to do it. I didnt expected to work because it's probable that im jumping many layers of TouchGFX.
This part of code was written from me in Screen1View.cpp - void Screen1View::DataDisplay():
touchgfx::Line line4;
touchgfx::PainterRGB565 line4Painter;
line4.setPosition(204, 0, 23, 240);
line4Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
line4.setPainter(line4Painter);
line4.setStart(0, 240);
line4.setEnd(0, 0);
line4.setLineWidth(4);
line4.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
add(line4);
Thank you very much.
