# Window Layer read only?

**URL:** <https://forum.inductiveautomation.com/t/window-layer-read-only/4580>\
**Category:** Ignition\
**Created:** [June 6, 2012, 5:01am UTC](https://forum.inductiveautomation.com/t/window-layer-read-only/4580 "2012-06-06T05:01:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomt](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tomt](https://forum.inductiveautomation.com/u/tomt)\
**Post date:** [June 6, 2012, 5:01am UTC](https://forum.inductiveautomation.com/t/window-layer-read-only/4580/1 "2012-06-06T05:01:16Z")

</div>

I had a project I upgraded from 7.3.X to the latest (7.4.3). In it, I was writing to the window layer via a script to bring a window to the top or push it back, without actually closing it. My script now give an error about how the layer attribute is read only. Did something change? Is this intentional?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [June 6, 2012, 2:40pm UTC](https://forum.inductiveautomation.com/t/window-layer-read-only/4580/2 "2012-06-06T14:40:58Z")

</div>

What is the error? Can you post the details here?

---

<div class="post-metadata">

**Author:** ![tomt](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tomt](https://forum.inductiveautomation.com/u/tomt)\
**Post date:** [June 6, 2012, 4:12pm UTC](https://forum.inductiveautomation.com/t/window-layer-read-only/4580/3 "2012-06-06T16:12:03Z")

</div>

See attached. THere is a button that attempts to set the layer of the window.  
[layer\_test.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e2834d2e363dcbfafddccf80a55f49e384dafac4.proj) (4.16 KB)

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [June 6, 2012, 5:07pm UTC](https://forum.inductiveautomation.com/t/window-layer-read-only/4580/4 "2012-06-06T17:07:22Z")

</div>

I was able to look at this and found a solution. Try the code below and see if it works out for you

`value = 6
event.source.parent.parent.parent.parent.setLayer(value)`
