When to use TPanel FullRepaint?

I noticed that resize flicker gets a lot better when I set TPanel.FullRepaint to False . Since the property exists and defaults to True , there must be some reason for this.

How to decide whether it should be installed or not?

On the right, it simply says:

FullRepaint controls the response of the panel when it changes. When FullRepaint is true, the entire panel, including the beveled border, redraws when resized. When FullRepaint is false, only the area inside the beveled border.

http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ExtCtrls.TPanel.FullRepaint

This text says what he does, but not why ...

+6
source share
2 answers

The effect of the missing Fullrepaint can be shown, and you have to decide whether you need it or not.

  • Place the panel on the form, set the bindings to all directions.
  • Set PaintCaption to false or use a blank signature
  • Place another shape on the shape so that when you resize the shape, parts of the first panel will be covered by the second panel.

Run the program and the size of the form when the borders of the first panel are not updated.
This is because in WMWindowPosChanged, in the case of (FullRepaint or (ShowCaption and (Caption <> ''))), invalidate will be called, otherwise only InvalidateRect (Handle, Rect, True) from the lines containing only the right and / or lower border is invalid . (thanks to Sertac Akyuz for correction)

As you mentioned, avoiding invalidity, reduces flicker, and in many cases the need for complete invalidity is not provided, so the user can decide for himself how to proceed.

Panels are rarely used, on top without Fullrepaint

+4
source

In previous versions of Windows (not sure which version, for sure) FullRepaint needed to prevent graphical artifacting at the borders of the panel when resizing the form. As far as I know, this was not a problem, at least with Windows XP.

0
source

All Articles