The internals of the algorithms are explained here: LCL AutoSizing.įixed design is the default. ChildSizing: lets you set the layout and spacing of child controls.BorderSpacing: lets you set the spacing between anchored controls.Constraints: lets you set a minimum and maximum for the Width and Height.Anchors: lets you create dependencies, for example to anchor a ComboBox to the right side of a Label.AutoSize: autosize instructs the LCL to automatically resize the Width and Height of a control.Several important properties can be changed to configure autosizing: OnResize, OnChangeBounds - however, if you set bounds that conflict with the rules above you will create an endless loop.Custom controls: writing your own controls, you can override nearly every LCL behaviour you want. Custom via OnResize: you can align controls yourself in code using the OnResize and OnChangeBounds events.Layout: controls can be automatically aligned in rows and columns (e.g.Anchoring means: the LCL will try to maintain the same distance from the anchor point. Anchored: you can anchor a control's sides (left, top, right, bottom) to its parent or to another control.Aligned: aligned controls fill up the remaining parental space at the top, bottom, left, or right, or fill the entire remaining space.You can move the control around with the mouse, and resize it freely. The control's size and position (Left, Top) is fully adjustable by the programmer. The control's position is fixed relative to its parent. Fixed design: this is the default when placing a control in the Designer.The LCL allows you not only to make a quick first design (moving controls around on a form using the mouse) but also later to set several key properties which will make the controls automatically adapt subsequently to changed content etc. If you want to run your program on several platforms, or if your captions are available in several languages, your controls need to adapt correctly to their environment. The LCL can automatically alter a control's size and position so it adapts to changes in font, theme and text or other content. 17.7.4 LCL interface bug, custom widget.17.7.3 OnResize/OnChangeBounds conflict with LCL properties.
0 Comments
Leave a Reply. |