# Windows opened / closed / activated not fired!

**URL:** <https://forum.inductiveautomation.com/t/windows-opened-closed-activated-not-fired/10556>\
**Category:** Ignition\
**Created:** [October 1, 2015, 8:28am UTC](https://forum.inductiveautomation.com/t/windows-opened-closed-activated-not-fired/10556 "2015-10-01T08:28:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabrice\_CHAVEROT](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Fabrice\_CHAVEROT](https://forum.inductiveautomation.com/u/Fabrice_CHAVEROT)\
**Post date:** [October 1, 2015, 8:28am UTC](https://forum.inductiveautomation.com/t/windows-opened-closed-activated-not-fired/10556/1 "2015-10-01T08:28:16Z")

</div>

Hello,

I have set a print Python handler in the events associated with operniong/closing or activating windows operations, but it seems these events are not fired because I don’t see any message in the console, only the message associuated with ActionPerformed (see the png attached)

I need to handle these events for initialising Python code (when Windows open) or cleanbing (when the window close)

I am on Ignition 7.6.7

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/76d2f03e7bedb323d16005df37071182994a2f1f.PNG)

---

<div class="post-metadata">

**Author:** ![Fabrice\_CHAVEROT](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Fabrice\_CHAVEROT](https://forum.inductiveautomation.com/u/Fabrice_CHAVEROT)\
**Post date:** [October 1, 2015, 8:31am UTC](https://forum.inductiveautomation.com/t/windows-opened-closed-activated-not-fired/10556/2 "2015-10-01T08:31:12Z")

</div>

in my post i wanted to say ‘propertyChange’ instead of ‘ActionPerformed’

So the only print I see is PropertyChange sometimes when the window close or open (not all time)

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [October 1, 2015, 9:45am UTC](https://forum.inductiveautomation.com/t/windows-opened-closed-activated-not-fired/10556/3 "2015-10-01T09:45:28Z")

</div>

Are you testing this in the Designer? Doing this can leave windows open instead of closing them and confuse the situation. You are better to create 2 windows with buttons to swap from one to the other and test them in a client, looking at the console in the diagnostics window (open this with Help / Diagnostics or Ctrl+Shift-F7).

I put print statements in all the internalFrame and visionWindow events. When I first opened the window the following events fired:`visionWindowOpened
internalFrameOpened
internalFrameActivated`When I closed the window these events fired:`internalFrameDeactivated
internalFrameClosing
visionWindowClosed
internalFrameClosed`When I opened the window a second time these events fired:`visionWindowOpened
internalFrameActivated`When I closed the window a second time these events fired:`internalFrameDeactivated
internalFrameClosing
visionWindowClosed
internalFrameClosed`The only difference is that internalFrameOpened only fires the first time, maybe because the window is being cached.

All that said, if I wanted code to run when a window opened I would put it in visionWindowOpened. If I wanted it to run when a window closed I would put it in visionWindowClosed.

Be careful putting code in the propertyChange event. This runs a lot and you have to filter it by checking the name of the event before you run any code.

---

<div class="post-metadata">

**Author:** ![Fabrice\_CHAVEROT](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Fabrice\_CHAVEROT](https://forum.inductiveautomation.com/u/Fabrice_CHAVEROT)\
**Post date:** [October 1, 2015, 12:56pm UTC](https://forum.inductiveautomation.com/t/windows-opened-closed-activated-not-fired/10556/4 "2015-10-01T12:56:53Z")

</div>

Thanks a lot I am going to test it on a vision Client on the gateway (effectively I have tested in the designer)

I am going to test if the cache polici property has an influence ( by switching never / always) to see if all events are fired when the window is cached

---

<div class="post-metadata">

**Author:** ![Fabrice\_CHAVEROT](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Fabrice\_CHAVEROT](https://forum.inductiveautomation.com/u/Fabrice_CHAVEROT)\
**Post date:** [October 1, 2015, 1:51pm UTC](https://forum.inductiveautomation.com/t/windows-opened-closed-activated-not-fired/10556/5 "2015-10-01T13:51:36Z")

</div>

I have tested with and without cache and it works in the 2 cases if I run the projhect on the gateway and check with Help-\>Diagnostic\>Console

Thanks for the help

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [October 1, 2015, 3:19pm UTC](https://forum.inductiveautomation.com/t/windows-opened-closed-activated-not-fired/10556/6 "2015-10-01T15:19:53Z")

</div>

I’d stick with the visionWindow Opened / Closed events, and don’t mess with the internal frame events if you can help it.

---

<div class="post-metadata">

**Author:** ![mriederer](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@mriederer](https://forum.inductiveautomation.com/u/mriederer)\
**Post date:** [January 24, 2019, 12:37am UTC](https://forum.inductiveautomation.com/t/windows-opened-closed-activated-not-fired/10556/7 "2019-01-24T00:37:35Z")

</div>

I second this. The Event Description for internalFrameActivated is a bit misleading regarding the focusing part.
