(see also: Scroll my control without flicker effect)
If you do not include csOpaque in ControlStyle then Invalidate calls
will cause the control's background to be erased.
If you draw your control's background in the Paint method then you should do this in
your constructor:
constructor TMyControl.Create; begin inherited; ControlStyle := ControlStyle + [csOpaque]; end; | ||