Vcl.Controls.TWinControl.OnAlignPosition

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnAlignPosition: TAlignPositionEvent read FOnAlignPosition write FOnAlignPosition;

C++

__property TAlignPositionEvent OnAlignPosition = {read=FOnAlignPosition, write=FOnAlignPosition};

Properties

Type Visibility Source Unit Parent
event protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TWinControl

Description

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.

AlignRect

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

AlignInfo

Alignment information in a TAlignInfo.

As implemented in TWinControl, OnAlignPosition does nothing.



See Also