TCustomFlowPanel.CalculatePreferredSize procedure
Calculates the preferred size for the control.
Declaration
procedure CalculatePreferredSize(var PreferredWidth: Integer;
var PreferredHeight: Integer;
WithThemeSpace: Boolean); overrideArguments
PreferredWidth | Preferred width for new instances of the control. |
PreferredHeight | Preferred height for new instances of the control. |
WithThemeSpace | True if additional space is reserved for theme element details. |
Description
CalculatePreferredSize is an overridden procedure used to calculate
the preferred height and width for the flow panel. The preferred height and
width are used in the LCL auto-sizing algorithm as the default size for the
control. CalculatePreferredSize calls the inherited method on entry to
calculate preferred dimensions for its child Controls.
CalculatePreferredSize extends the inherited method to calculate the preferred width and height using the FlowStyle for the child Controls. It ensures that additional space for bevels on the panel and BorderSpacing for the child controls are included in the calculated preferred width and height. Only visible child controls are included in the calculated values.
Modified in LCL 2.2.6+ to exclude hidden child controls from the calculated dimensions for the flow panel.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
