RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Controls.TAlignPositionEvent Type

TAlignPositionEvent is the function type for an OnAlignPosition event.

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

Controls

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.  

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!