# Setting pop up location dynamically

**URL:** <https://forum.inductiveautomation.com/t/setting-pop-up-location-dynamically/9751>\
**Category:** Ignition\
**Created:** [February 26, 2015, 9:01pm UTC](https://forum.inductiveautomation.com/t/setting-pop-up-location-dynamically/9751 "2015-02-26T21:01:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpeasley](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mpeasley](https://forum.inductiveautomation.com/u/mpeasley)\
**Post date:** [February 26, 2015, 9:01pm UTC](https://forum.inductiveautomation.com/t/setting-pop-up-location-dynamically/9751/1 "2015-02-26T21:01:02Z")

</div>

Is this a possible function? I know that you can hard set a pop up location, but I am trying to have values moved in dynamically based on three different locations on the screen. each button would open the same window with different parameters in a different location.

thank you

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [February 26, 2015, 9:33pm UTC](https://forum.inductiveautomation.com/t/setting-pop-up-location-dynamically/9751/2 "2015-02-26T21:33:36Z")

</div>

Hi mpeasley,

You should add custom properties to the root container of the popup window. The custom properties will hold the X and Y position you want to position the popup window at.

Each of your buttons should pass in as arguments to the window the position you want the window to be at. The window receives the arguments into the root container custom properties that you made and uses them to position the window. You can set the position of a window in a Python script with window.setLocation(x,y). Try putting the script into the visionWindowOpened event handler on the popup window. Or in a propertyChange event handler on the root container for when the X or Y property changes.

Best,

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [December 9, 2018, 9:08am UTC](https://forum.inductiveautomation.com/t/setting-pop-up-location-dynamically/9751/3 "2018-12-09T09:08:34Z")

</div>

what is the script for changing the width and height of window without scaling?  
I test window.setSize(W,H) but it scale the window. I want to expand window not scale it.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 9, 2018, 2:55pm UTC](https://forum.inductiveautomation.com/t/setting-pop-up-location-dynamically/9751/4 "2018-12-09T14:55:53Z")

</div>

> [@nader.chinichian](#):
>
> I want to expand window not scale it.

You need to set the Layout of the components in the window to Anchored. Each of them.
