Description

Any view in Perspective can be called as a popup. This lesson demonstrates how to call a view as a popup.

Video recorded using: Ignition 8.1

Transcript

(open in window)

[00:00] In this lesson, we will look at popups and perspective. From my designer, I have two views open. A main view with a button component and a popup view with a different color background and a label component. In perspective, any view can be used as a popup without the need for specific configuration changes. So what I will do, is configure the button in my main view to open the popup view as a popup. To do this, select the button, right click on the button, select configure events to open the event configuration window. From the events tree, select on action performed. Click on the plus icon next to the organized actions table and select popup. Under the select view dropdown, you will see a list of all the views available in your project. I select my popup view, click okay and save my changes.

[01:02] What I have done here, is configured my button in my main view to use a component event to trigger the opening of my popup view. To test this, we simply head to tools, launch perspective, launch session. Once my session opens, I see my button in my main view up here. When I click it, I see that my popup opens as expected. Let's go back to our designer. What if we wanted to configure the popup to not be draggable and perhaps give it a title. To do this, we right click on our button, select configure events to bring up the event configuration window, under title, we will type my title, and under behavior, we will uncheck the draggable checkbox. Click okay and I save my changes. Now when I relaunched my session, and click on the button in the main view, we see that our popup now has the title of my title.

[02:06] And when I try to drag the popup, I am no longer able to do so. As an alternative to using the popup action, I could have used a script action as well to open my popup via scripting. To do this, I right click on my button, select configure events to open the event configuration window, click on the plus icon next to the organized action table, I then select script to create a new script action. This will bring up a code editor where you can use the system.perspective.open popup scripting function to open your popup view.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.