Complex call pupup with scripts

<< Click to Display Table of Contents >>

Navigation:  Examples > Call popup >

Complex call pupup with scripts

Previous pageReturn to chapter overviewNext page

For example we've got some complex group object:

ventgroup

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:

objectobjectwindow

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:

callpopuptags

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:

tagexamplecallpopup

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:

popupwindowcall

We also create tags for this popup window:

popuptags

To have possibility to send some information from group object to popup window we can create user-defined properties:

callpopupudproperties

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. No we have to call popup window and send our user-defined properties to it. To do this enable Control property:

callpopupcontrol

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:

popupwindowcallfirst

Text of this script here:

popupscript1

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:

popupchange

Text of this script here:

otherscriptpopup

Now add this script add to our popup window:

popupscriptcollection

And now let's check how it works:

callpopupcomplex