Why not do it on the paint routine? It depends on what exactly you're trying to achieve, but you can set up a data structure as a member variable which is an array of a struct which contains the coordinates of the bounds and the shape type. You just add to this when the button is pressed and trigger a repaint. Then in your paint routine you just draw anything that's in the array.
yes, it's one way, but i wish there was a more easy way to do it.
What i need to do is that in a specific component, i have a progress indicator, and when i advance on the progress of configuration, i must paint a ball with a number inside.
And in other points i will need to draw more things and wanted to avoid doing it in the paint part.