Canvas.Fillrect vs Rectangle.Fillcolor

I have an app (for teaching purposes) that shows a rectangle and 3 sliders. The sliders correspond with a RGB colorsetting. If you move the slider, the RGB of the rectangle is changed. Nothing fancy here.

When I use the canvas with the g.paint method and the canvas.invalidate method for the sliders I get lots of flicker. The canvas does not allow me to choose Double Buffer, it switches back to off. Don’t know why. GDI+ is On.

When I use a Rectangle and the Rectangle.Fillcolor method, there is no flicker, no matter how fast I move the sliders. How come?
Xojo 2015 3.1 Desktop Windows

What is the value of the Canvas’ EraseBackGround property?
If the canvas erases to background color THEN draws your rectangle, you are probably seeing the background flicker through.

[quote=240842:@Jeff Tullin]What is the value of the Canvas’ EraseBackGround property?
If the canvas erases to background color THEN draws your rectangle, you are probably seeing the background flicker through.[/quote]
That was ON. Switching it off did the trick… thanks!