Question
Is it possible to dynamically add GUI-Objects?
Hi folks,
I'm trying to add a set of objects (in this case: a circle) to the GUI, as soon as the user presses a button. Therefore, I'm trying to execute the following code on the button press:
touchgfx::Circle circle2;
touchgfx::PainterRGB565 circle2Painter;
circle2.setPosition(309, 136, 90, 90);
circle2.setCenter(45, 45);
circle2.setRadius(40);
circle2.setLineWidth(10);
circle2.setArc(0, 280);
circle2.setCapPrecision(180);
circle2Painter.setColor(touchgfx::Color::getColorFrom24BitRGB(255, 255, 255));
circle2.setPainter(circle1Painter);
add(circle2);
circle2.invalidate();As soon as the button is pressed, the system won't react anymore. The "clicked_button" bitmap is displayed, nothing else happens.
What am I missing out? Is it actually possible to add GUI-objects at runtime? Is the buffer to small?
Thanks for your help!
