Popup Screen Open Status

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
artistmonkey
Posts: 7
Joined: Sun May 27, 2018 9:11 pm

Popup Screen Open Status

Post by artistmonkey »

Is there any way to check popup screen is opend or not by scripting without using any tag?

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

Re: Popup Screen Open Status

Post by Russ C. »

You could use global variables in scripting to keep track, but that is essentially a tag, and tags might be easier.
But there isn't a method that you can access for that information like

Code: Select all

if(PopupScreen1.IsCurrentlyOpen())
{
     //Do something
}
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

liestol
Posts: 13
Joined: Thu Feb 11, 2016 5:11 am

Re: Popup Screen Open Status

Post by liestol »

If there are no available methods to this, a quick hack would be something like this I would assume:

- make a internal boolean tag popupOpened
- set popupOpened to true in popup_Opened()
- set popupOpened to false in popup_Closed()

Code: Select all

void Screen1_Opened(System.Object sender, System.EventArgs e)
{
	Globals.Tags.popupOpened.Value = true;
}
		
void Screen1_Closed(System.Object sender, System.EventArgs e)
{
	Globals.Tags.popupOpened.Value = false;
}
You can as Russ mentioned do this by using global variables as well, any reason why you don't want to use a tag to do this?

Post Reply