vsTASKER 7 User Manual
×
Menu
Index

Windowing

 
Each HMI panel can hold any number of overlaying windows which can popup and hide on request, using code functions.
These windows behave like HMI sub panels.
Each of them can have any size smaller than the HMI panel they belong too.
They also can be repositioned by the user mouse on the title bar, or closed using the x button.
 
 
Let's create a little window that will popup with a button on the Base Window (panel) and will close with a button on the popup window itself.
 
First, create a simple Push Button on the Base Window.
 
Load the following textures:
/Data/Hmi/Simple/button_up.gif
/Data/Hmi/Simple/button_down.gif
 
Set Open as a Caption.
 
Now, click on the + tab to add a new window for the panel:
 
Then resize the window:
 
Add now the close Push Button (same as above but with Close caption):
 
On the Runtime code of the push button, add the following code:
 
H:closeWindow("Win1");
 
Now, click on Base Window tab and on the Runtime code of the Open push button, add the following code:
 
H:openWindow("Win1");
 
Compile and run: