How Do I ... : Work with complex parts : Add windows : Example: Use two windows
Example: Use two windows
Add windowsAdd windowsNo tips for this topicNo example for this topicAdd menusAdd menus
This example shows how to add a second window to the Composition Editor and move easily between the windows.
Adding a second window  
Suppose you have created an application, added a visual part to it, and opened a Composition Editor on the visual part. The new visual part has a window already in it. To add a second window:
1. Select Canvas category icon(Canvas category) and then Window, the Window part.
2. Click on the free-form surface.
Now, add a push button to each window. Push Button icon(Push Button part) is in Buttons category icon(Buttons category).
After you add the window and push buttons, change their labels and arrange them so the Composition Editor displays the following:
Two windows
Making connections  
To add function to the parts, make the following connections:
Connect the clicked event of the Open Window2 push button to the openWidget action of Window2.
Connect the clicked event of the Cancel push button to the closeWidget action of Window2.
Finally, test the application. Selecting Open Window2 opens the window you added, and selecting Cancel closes it.
Last modified date: 08/14/2019