<< Click to Display Table of Contents >> Complex call pupup with scripts |
![]() ![]() ![]() |
For example we've got some complex group object:
Let's name it - FBMotorAOVentil. It consists from several primitives objects - Rectangle, Ellipse, Polygon, Image, Text/EditField and over these objects we've placed transparent Button - CallPopup:
How to group object you can find out in the chapter - Example: How to create new graphical object. In our current example this object is bound to several tags:
To make the scaling of this project more easy and have possibility to copy this group of tags faster for next similar object we've bound name of tags to the group by using {group} keyword. Example:
We'd like to call popup screen by click on this group object (click on transparent button - CallPopup to be exactly) and display all properties in proper fields. Our popup window looks like this:
We also create tags for this popup window:
To have possibility to send some information from group object to popup window we can create user-defined properties:
The main user-defined property is objectname. In our case it's equal VE01. For other objects you can change only this property to bind to other group of tags. Now we have to call popup window and send our user-defined properties to it. To do this enable Control property:
In Command and args field we put our user-defined tags into bundle of global arguments. Now we can create first script that will be called when our popup window is opened:
Text of this script here:
Next script we create to catch changes in popup tags and set value of group object's tag, and reverse to catch changes value of group object's tag and set value of popup tags:
Text of this script here:
Now add this script add to our popup window:
And now let's check how it works:
You can download this project here.