Page object is a different choice of containers to add and arrange GUI components on your GUI. Page object looks similar to ordinary html page, but It differs from it in usage and behavior.
Use page component when you need a style other than window box to your UI.
In this example, we created a page container with 'Test' title and added a text component to it.
Use showPage method to show the page.
Close Page ContainerIn this example, we added a close button to close and hide the page container. The hidePage method will close the latest opened page container.
Page object constructor may take several optional parameters:
var pgTest = new TPage(title, backColor, margin, padding, layout);
By default page container takes vertical layout. You may set a horizontal layout instead by passing a layout object to the constructor.
| Method | Description |
|---|---|
| Add | Adds an object to page |
| Refresh | Resize page object with its contents based on view port dimensions |
| setBackground | sets page background color or image |
| setTitle | sets page title |