RAD Studio VCL Reference
TWinControl.EnableAlign Method

Decrements the reference count incremented by the DisableAlign method, eventually realigning the child controls.

procedure EnableAlign;
__fastcall EnableAlign();

Call EnableAlign to allow child controls within the control to realign again after they were prevented from realigning by a call to DisableAlign.  

Each time the DisableAlign method is called, it increments a reference count. Each time EnableAlign is called, it decrements the same reference count. When the reference count reaches zero, EnableAlign calls the Realign method to perform any pending realignments. 

Be sure to pair each call to DisableAlign with a call to EnableAlign. If an exception could be raised after the call to DisableAlign, use an exception block to ensure that the corresponding call to EnableAlign is executed. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!