Controls are aligned on the form after you create them in the form editor, so they remain immobile. In other words, the left edge of the control is set so that the distance to the left edge of the father, that is, the form or parent control, remains constant. The same applies to the upper edge, but here the distance to the upper edge of the father is kept constant. The same connection applies to the right and lower edges.
These settings can be modified in the container properties of a control:
The AlignLeft, AlignRight, AlignTop and AlignBottom container properties determine which distance to which edge of the reference element is kept constant.
The AlignTypeLeft, AlignTypeRight, AlignTypeTop and AlignTypeBottom container properties determine which reference element to use. This can be the parent element (AlignTypeParent), the own element (AlignTypeMe) or another element (AlignTypeControl), which is then included in the properties AlignElementLeft, AlignElementRight, AlignElementTop or AlignElementBottom can be specified.
The MinWidth and MinHeight container properties specify the minimum width and height of the control in the Twips unit. The maximum size of the control can be set using the MaxWidth and MaxHeight properties. Specify 0 if you do not want MaxWidth or MaxHeight to be used.
Do the following settings:
Class Start – form MainForm | |
Control |
Setting |
[Product settings] |
AlignBottom = AlignVerBottom |
[Product form] |
AlignRight = AlignHorRight AlignBottom = AlignVerBottom |
Total |
AlignTop = AlignVerBottom AlignBottom = AlignVerBottom |
Class Products – form [Product Form] | |
Control |
Setting |
Register1 |
AlignRight = AlignHorRight AlignBottom = AlignVerBottom |
(knowledge base Tutorial Stage 5)