Disables the realignment of child controls.
Call DisableAlign to temporarily prevent child controls from realigning. For example, while performing multiple manipulations of controls, such as reading from a form file or scaling, performance improves if child controls are not realigned until all manipulations are complete. The EnableAlign method restores normal child realignment.
Every call to DisableAlign must be followed by a matching call to EnableAlign. If an exception could be raised after the call to DisableAlign, use an exception block to ensure that EnableAlign will always be called.
DisableAlign/EnableAlign call sequences can be nested. An internal counter records the level of nesting. As long as the counter is positive, realignment is disabled and the AlignDisabled property returns true. Once the counter returns to zero, realignment is enabled and AlignDisabled returns false.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!