Difference between revisions of "LCL AutoSizing"

From Free Pascal wiki
Jump to navigationJump to search
Line 23: Line 23:
 
The main method is TWinControl.AlignControls.
 
The main method is TWinControl.AlignControls.
  
+AdjustClient
+
#AdjustClient
+alTop,alBottom,alLeft,alRight,alClient,alCustom,alNone
+
#alTop,alBottom,alLeft,alRight,alClient,alCustom,alNone,not aligned
 +
##

Revision as of 20:30, 5 September 2007

Overview / Terminology

This page explains the LCL auto sizing algorithm. AutoSizing means here: Automatic resizing and repositioning of LCL controls.

Properties

The following properties defines the behavior of the LCL autosizing:

  • Current Left,Top,Width,Height,ClientWidth,ClientHeight
  • Loaded Left,Top,Width,Height,ClientWidth,ClientHeight
  • AutoSize
  • Anchors
  • AnchorSides
  • Align
  • BorderSpacing
  • ChildSizing
  • Constraints

For Delphi compatibility the LCL supports the method AdjustClientRect which is an extension to the BorderSpacing properties.

Order

The main method is TWinControl.AlignControls.

  1. AdjustClient
  2. alTop,alBottom,alLeft,alRight,alClient,alCustom,alNone,not aligned