Vcl.StdCtrls.TButton.Align
Delphi
property Align: TAlign read FAlign write SetAlign default 0;
C++
__property Align = {default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Vcl.StdCtrls.pas Vcl.StdCtrls.hpp |
Vcl.StdCtrls | TButton |
Description
Determines how the control aligns within its container (parent control).
Vcl.StdCtrls.TButton.Align inherits from Vcl.Controls.TControl.Align. All content below this line refers to Vcl.Controls.TControl.Align.
Determines how the control aligns within its container (parent control).
Use Align to align a control to the top, bottom, left, or right of a form or panel and have it remain there even if the size of the form, panel, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the top, bottom, left, or right edge of the parent.
For example, to use a panel component with various controls on it as a tool palette, change the panel's Align value to alLeft
. The value of alLeft
for the Align property of the panel guarantees that the tool palette remains on the left side of the form and always equals the client height of the form.
The default value of Align is alNone
, which means a control remains where it is positioned on a form or panel.
alClient
, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the form and pressing ESC, or by using the Object Inspector.Any number of child components within a single parent can have the same Align value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions.
See Also
Code Examples
- Splitter (Delphi)
- TControlAlign (Delphi)
- TTabSheetPageControl (Delphi)
- Splitter (C++)
- TControlAlign (C++)
- TTabSheetPageControl (C++)
- VCLButtons(Delphi)
- VCLButtons(C++)