Vcl.Controls.TAlignPositionEvent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TAlignPositionEvent = procedure(Sender: TWinControl; Control: TControl;
var NewLeft, NewTop, NewWidth, NewHeight: Integer;
var AlignRect: TRect; AlignInfo: TAlignInfo) of object;

C++

typedef void __fastcall (__closure *TAlignPositionEvent)(TWinControl* Sender, TControl* Control, int &NewLeft, int &NewTop, int &NewWidth, int &NewHeight, System::Types::TRect &AlignRect, const TAlignInfo &AlignInfo);

Properties

Type Visibility Source Unit Parent
type
typedef
public
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls Vcl.Controls

Description

TAlignPositionEvent is the function type for an OnAlignPosition event.

CustomAlignPosition triggers the OnAlignPosition event. OnAlignPosition occurs for each child control with an Align property of alCustom when it is aligned. It can determine where the control is placed by specifying the alignment parameters.

TAlignPositionEvent has the following parameters:



Parameter Meaning

Sender

Parent control.

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.



See Also