How to Use Multiscreens in the Viewer
Purpose of this article
This article aims to show how to use multiple screens in a viewer. For this article, we will use the following example:
- The Viewer has a resolution of 1920×1080, that is, 1920 in width and 1080 in height.
- A viewer will show two screens.
- The screen called “Frame1” will be the main screen, where the application will start.
- The screen called “Frame2” will be the second screen, located to the left of the “Frame1” screen.
1. Configuring the screen resolution of the application
- Create a new application and then click on the “Settings” tab and then set the viewer resolution to 1920×1080.
- Create two screens. Frame1 and Frame2.
- Set the Frame1 screen as the application’s home screen.
- Let’s identify each screen. Insert a label object into the “Frame1” canvas.
- Insert the label object into the “Frame2” screen.
- On the “Frame1” screen, click on the screen area and in the “onOpen” event, insert the following script:
This script aims to use the SVGraphics.Open function to open a screen. Therefore, whenever screen “Frame1” is opened by the application, screen “Frame2” will also be opened.
- On the “Frame1” and “Frame2” screen, in the property list, keep the properties as follows:
- On the “Frame1” screen, keep the screen, keep the “Top” property at “0”.
- On the “Frame2” screen, set the “Top” property to “-1920”.
- Save and run the application. Below is the expected result.
- If you want to open more screens, for example a third screen to the right of the main screen, insert another function “SVGraphics.Open” in the OnOpen event of screen “Frame1” and on the right screen, set the property “Top” to “1920 “.