Resize
Resize(windowID, childID), Resize(windowID), Resize(, childID), Resize
parameters: Identifier of a Windows and a child Windows object
Stack | Position | Description |
---|---|---|
Stack(In) | Top | Height |
Top 1 | Width | |
Stack(Out) | Top | - |
The size of the window object is adjusted to the new height/width. The size is always specified in minicells, just like when defining the window objects. Exceptions are toplevel windows, because Minicells make little sense outside a window and pixels are more suitable for positioning windows.
This command is symmetrical to GetSize . With Resize you can also resize widgets that do not have a height specification (e.g. String). These widgets are often positioned exactly on the pixel, so that a GetSize Resize changes the height of the widget anyway due to the inaccuracy of the minicells. Widgets whose width/height is defined by a STRETCH-attachment cannot be changed by resizing in the attached dimension.
After a widget has been resized, the attachments of the parent widget will be re-evaluated and the window will be redrawn. If the layout is no longer correct after resizing, the order or type of attachments may have to be adjusted (see: Evaluation of attachments).
Code example: (double the width of the current widget)
Var(width,height) GetSize -> height 2 * -> width width height Resize