Window object is the main container for all GUI components in the library along with the Page object. You may add and arrange components on it to form your user interface.
Create Window ContainerIn this example, we created a window container with 'Test' title and added a text component to it.
Use showModal method to show the window.
Close Window ContainerIn this example, we added a close button to close and hide the window container. The hideModal method will close the latest opened window container.
In addition to the title parameter of the createWindow method, there are severl optional parameters:
createWindow(title, margin, padding, layout, underText);
By default window container takes vertical layout. You may set a horizontal layout instead by passing a layout object to the method.
| Method | Description |
|---|---|
| Add | Adds an object to window |
| Refresh | Resize window object with its contents based on view port dimensions |
| setTitle | sets window title |