[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Forms' (#lcl)

# TCustomDesignControl

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Provides a designer surface for scaling and layout of its child controls.

## Declaration

Source position: forms.pp line 286

`type TCustomDesignControl = class(TScrollingWinControl)`
`protected`
`procedure SetScaled(); virtual;` |  | Sets the value for the Scaled property.
`procedure DoAutoAdjustLayout(); override;` |  | Applies size and layout changes to the design surface and its Parent control.
`public`
`constructor Create(); override;` |  | Constructor for the class instance.
`procedure AutoAdjustLayout(); override;` |  | Applies a new display density (Pixels Per Inch) for a layout policy to the control.
`property DesignTimePPI: Integer; [rws]` |  | Design-time Pixels Per Inch for the designer surface.
`property PixelsPerInch: Integer; [rws]` |  | Run-time Pixels Per Inch for the designer surface.
`property Scaled: Boolean; [rw]` |  | Indicates if the design surface is scaled to reflect changes in display density (Pixels Per Inch).
`end;`

## Inheritance

`TCustomDesignControl` |  | Provides a designer surface for scaling and layout of its child controls.
`TScrollingWinControl` |  | Implements a windowed control with scroll bars.
`TCustomControl` |  | The base class for windowed controls which paint themselves.
`TWinControl` |  | Implements a windowed control which can contain other child controls.
`TControl` |  | The base class for visible controls.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

TCustomDesignControl is a TScrollingWinControl descendant which provides a designer surface used for scaling and layout of its child controls.

Properties are provided to set the display density (Pixels Per Inch) for design-time and run-time usage, and to Scale child controls. Methods are also provided to use TLayoutAdjustmentPolicy to layout and to re-size the child controls.

An overridden Loaded method is provided to adjust the design-time PPI (when scaling is enabled in the application).

TCustomDesignControl is used as the ancestor for TCustomFrame and TCustomForm.

## See also

TApplication.Scaled |  | Indicates if forms and controls in the application can be scaled to different display densities (Pixels per Inch).
TCustomForm |  | The base type for TForm classes.
TCustomFrame |  | The base type for TFrame.
GetParentDesignControl |  | Gets the control which is the top-most TCustomDesignControl instance for the specified control, or Nil when not a TCustomDesignControl instance.
NeedParentDesignControl |  | Ensures that a TCustomDesignControl instance is found for the specified control.