gre.resize_control( control_name, dw, dh, w, h, [ah], [av] )
Resize a control. The control_name is the name of the control or a variable. Setting dw and or dh will resize the control by the specified delta from its current size. The dw
and dh
values can be 0 to set an absolute position using the w
and h
values only.
Optional anchors can allow for automatic adjustment of the control's x and y positions to keep the control anchored in the desired position as the control's size change:
Horizontal:
-
grd.LEFT
anchor will not adjust the control's x position. This is the default behavior. -
grd.CENTER
anchor will adjust the control's x position by half the difference in control width. -
grd.RIGHT
anchor will adjust the control's x position by the difference in control width.
Vertical:
-
grd.TOP
anchor will not adjust the control's y position. This is the default behavior. -
grd.CENTER
anchor will adjust the control's y position by half the difference in control height. -
grd.BOTTOM
anchor will adjust the control's y position the difference in control height.
Parameters: control_name The model full path of the control to move dx A delta from the current x position or 0 to move using x dy A delta from the current y position or 0 to move using y x The x position to move to in absolute co-ordinates (omit to use dx) y The y position to move to in absolute co-ordinates (omit to use dy) ah The horizontal anchor, gre.LEFT
, gre.CENTER
or gre.RIGHT
(Optional, default is gre.LEFT
) vh The vertical anchor, gre.TOP
, gre.CENTER
or gre.BOTTOM
(Optional, default is gre.TOP
)