RefreshRect not firing Paint event

On Big Sur (11.0.1) with Xojo 2020 r2 and the above test app, the Paint event is entered at the end of the KeyDown event but the areas() parameter has no values. Consequently no squares are drawn!

Don’t worry about that I was trying to figure out what you were seeing but the code and demo project helps a lot.

I’ll add this to your ticket.

Edit: Bug aside, I however would recommend you have a little rethink about the way you do this and perhaps instead draw some rectangles during the paint which have individual colour properties as this will fail horribly if you ever port it to windows due to the way things redraw there and possibly break on mac if they ever change the redraw systems there.