TIvorySurface::ClearBackground

Determines whether the surface should be cleared before the OnPaint event.

__property bool ClearBackground;

Description

Set ClearBackground to true and DrawBackground to false if you want to get a clear background. The new background doesn't take effect automatically; you must call Paint to repaint the surface with the new background. If ClearBackground is false, the surface doesn't clear its background. In this case, the background remains undefined, unless you set DrawBackground to true, or you paint the surface on your own. The default value for ClearBackground is true.

Notes

If DrawBackground is true, the surface doesn't clear its background, but it draws a bitmap on the surface. If you want to paint the surface on your own, you can set ClearBackground and DrawBackground to false, so that you speed up you application. But in this case, the surface will remain undefined, and you need to clear or fill the surface on your own.

Back to TIvorySurface