Type: Boolean
Availability: Read or write at any time
The clipControls property of the Form class specifies whether the Windows environment creates a clipping region that excludes controls contained by the object.
Setting this property to true means:
Graphical methods for the form or control cannot draw over child controls.
When the form or control is repainted, the area occupied by the child controls is clipped out of the paint process; that is, the child control is not affected by the parent paint and is painted only if it is actually required.
This can result in less repaint "flash", because controls are not erased and repainted as often as when the clipControls property value is false.
This is a logical property for the Form class and BaseControl, GroupBox, Frame, Picture, and StatusLine controls.
The clipControls property settings are listed in the following table.
Value | A clipping region is… |
---|---|
true | Created around child controls of the form or control before a paint event (the default). |
false | Not created around child controls before a paint event. Complex forms usually load and repaint faster. |
Clipping is the process of determining which parts of a form or container (for example, a Frame control) are painted when the form is displayed. An outline of the form and controls is created in memory. The Windows environment uses this outline to paint some parts, such as the background, without affecting other parts; for example, the contents of a text box.
As the clipping region is created in memory, setting the clipControls property to false can reduce the time that is needed to paint or repaint a form.