|Type|| = ||"",|
|Dim|| = ||"",|
|HGlueCtrl|| = ||""||)|
Aligns controls inside the parent.
|HCtrl||Control’s handle or Parent handle. If other parameters are omitted, hCtrl represents Parent that should be re-aligned. Use re-align when you hide/show/resize controls to reposition remaining controls.|
|Type||String specifying align type. Available align types are Left, Right, Top, Bottom, Fill and N. Top and Bottom types are horizontal alignments while Left and Right are vertical. Fill type is both vertically and horizontally aligned. Control will be aligned to the edge of given type of its parent. For any given Type, control’s x, y are ignored, w is ignored for vertical, h for horizontal alignment.|
|Dim||Dimension, optional. This is width for vertical and height for horizontal alignment type. If you omit dimension, controls current dimension will be used. If you use dot infront of the number, everything after the dot will be seen as a handle of the control which serves as a marker. In this mode, hCtrl control is aligned according to the marker control.|
|hGlueCtrl||If present, changes behavior of the function. HCtrl will be glued to this control and Type will represent on which side to glue HCtrl to the hMarker. If first char of hMarker is “*”, the function will position control relative to its root window, otherwise, the repositioning is relative to its parent.|
Parent window size must be set prior to calling this function. Function is not limited to top level windows, it can align controls inside container controls.
The order in which you register controls to be aligned is important.
In case you use resizable GUI and Attach function, Align will reset Attach for the parent that is re-aligned.
Align(h1, "L", 100) ;Align this control to the left edge of its parent, set width to 100,
Align(h2, "T") ; then align this control to the top minus space taken from previous control, use its own height,
Align(h3, "F") ; then set this control to fill remaining space.
Align(hGui) ;Re-align hGui
Align(h3, "F", "", hGlueCtrl ) ; Align h3 to cover hGlueCtrl control
Align(h3, "T", 200, hGlueCtrl ) ; Align h3 to be put above hGlueCtrl control and have height=200.