RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCategoryButtons.OnAlignPosition Event

Occurs when an object with custom alignment is aligned.

Pascal
property OnAlignPosition: TAlignPositionEvent;
C++
__property TAlignPositionEvent OnAlignPosition;

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.  
 

 

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