From RAD Studio API Documentation
Jump to: navigation, search


property OnAlignPosition: TAlignPositionEvent read FOnAlignPosition write FOnAlignPosition;


__property OnAlignPosition;


Type Visibility Source Unit Parent
event published
Vcl.ActnCtrls TActionToolBar


Occurs when an object with custom alignment is aligned.

Vcl.ActnCtrls.TActionToolBar.OnAlignPosition inherits from Vcl.Controls.TWinControl.OnAlignPosition. All content below this line refers to Vcl.Controls.TWinControl.OnAlignPosition.

Occurs when an object with custom alignment is aligned.

OnAlignPosition occurs when child controls with an Align property of alCustom are aligned.

CustomAlignPosition triggers the OnAlignPosition event. If this event is defined, CustomAlignPosition uses the alignment parameters it obtains from OnAlignPosition. Defining this event allows users to set the alignment parameters without overriding CustomAlignPosition. It holds a TAlignPositionEvent type.

These are the parameters:

Parameter Meaning

NewLeft | NewTop | NewWidth | NewHeight

Location and size of child control, as determined by container's size and the Anchors TControl_Anchors constraints for the control. OnAlignPosition can modify these values to reposition the control.


The client area in which the control is aligned. OnAlignPosition can modify this value.


Alignment information in a TAlignInfo.

As implemented in TWinControl, OnAlignPosition does nothing.

See Also