sabato 14 aprile 2012 08:43
In my application I need to draw several filled rectangles on a panel with a tiled background image. Depending on user actions, certain - not all - rectangles must be removed afterwards, revealing the background image again. Drawing and filling the rectangles is not so difficult, but how can I remove them in such a way that the background gets restored correctly?
Tutte le risposte
sabato 14 aprile 2012 09:11Stop drawing them. Put the rectangles in a List(of Rectangle) and remove them when you when you don't want them drawn. Iterate through the list in the Paint event to draw the rectangles.
- Contrassegnato come risposta Cooz2 lunedì 16 aprile 2012 13:58
lunedì 16 aprile 2012 14:01
Yep, that works. "Stop drawing them ... draw the rectangles." had me a little puzzled at first though.