<< Prev        Next >>

ID : 1901

Example of Changing TP Panel Window

The following shows the sample program that changes the TP panel window when a button is pressed. Each layout has two buttons that switch the window to different windows.

Since one TP panel file can include one TP panel layout only, you need to create a TP panel file as much as the number of TP panel layout you want to create. This sample explains how to create and store three TP panel files in nested three folders. If three files are created in one folder, you do not need to specify the folder name in the window switching command (PageChange command).

1

Create the 3-level hierarchy with WINCAPSIII.

Load the editor, create three panel layouts, one at each level, with two buttons on each, and label the buttons for the two other panel layouts.

2

Open Source Code Edit windows for the panel layouts and add the appropriated line from the following action source code to each button's CLICKED event.

PageChange Folder1\Panel1 ' switch window to PANEL1 in FOLDER1

PageChange Folder1\Folder2\Panel1 ' switch window to PANEL1 in FOLDER2

PageChange \Main ' switch window to Main in the root folder

PageChange Folder2\Panel1 ' switch window to PANEL1 in FOLDER2

' Switch window to Main in the root folder. (relative path designation)
PageChange ..\..\Main

' Switch window to PANEL1 in FOLDER1. (relative path designation)
PageChange ..\Panel1

Compile the panel layouts, download them to the controller, and test.

ID : 1901

<< Prev        Next >>