# Change perspective popup size after it is opened

**URL:** <https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623>\
**Category:** Ignition\
**Created:** [September 12, 2020, 8:01pm UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623 "2020-09-12T20:01:01Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [September 12, 2020, 8:01pm UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/1 "2020-09-12T20:01:01Z")

</div>

Hi,  
Like vision I’d like to reside popup from popup itself.

I want to put a button in my popup and when user click it it extend the width of the popup to show some detail info.

Thanks for any help or idea.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [September 12, 2020, 11:41pm UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/2 "2020-09-12T23:41:01Z")

</div>

There’s no way to directly resize an existing Popup short of manually resizing it. With some fancy logic, you could sort of mimic the concept.

There are several considerations to account for:

1. `overflow` of Popup View. If “hidden” then the Popup size could allow for what you want; if any other setting you’re going to have scrollbars present if the Popup’s size is anything other than the default View dimensions, so I’ll assume you are using “hidden” for `overflow`.
2. The View used in the Popup will need to account for its own state (opened/closed) via a passed `id` param. Due to this, the View used in the Popup will need to contain the resize button.
3. This process is going to open a NEW Popup and close the old Popup, so any state of fields or user-modified info should be stored in session properties.

Steps:  
A. Open your small Popup with whatever dimensions you desire (we’ll say 300x300 for this example). Since the View’s `overflow` is “hidden”, any content outside of the 300x300 square will not be visible or interactive (so make sure the “Expand” button is completely within the visible dimensions). Make sure you supply this Popup an `id` as part of the Popup Action or Script Action, and make sure that same value is passed as a param to the View being used in the Popup.  
B. The “Expand” button should invoke a NEW Popup Action or Script Action which first OPENS a Popup with a MODIFIED id based on the passed `id` param, and the button should then CLOSE the Popup with the original `id` value.

You could use the same logic to “collapse” the Popup to its smaller appearance.

---

<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:** [September 13, 2020, 4:13am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/3 "2020-09-13T04:13:13Z")

</div>

Hi @cmallonee  
The only problem is remain how I can open my popup in the last exactly position again?  
I use to open my popup in the xy related to user mouse click and user may move popup, so when I close and reopen it I need to open it at last top left coordinate again.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [September 13, 2020, 6:40am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/4 "2020-09-13T06:40:22Z")

</div>

If you’re using the “relative” positioning options as part of the Popup Action instead of the Script Action you should be able to do this. You would just need two Popup Actions - one to open the new Popup, and one to close the “old” Popup.

---

<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:** [September 13, 2020, 7:38am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/5 "2020-09-13T07:38:28Z")

</div>

So if I open my popup related to mouse position it is not possible at all. 😔

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 13, 2020, 8:59am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/6 "2020-09-13T08:59:25Z")

</div>

Can you just store the coords in a session param before closing and reopening it? . You should only need one set of x/y params for all popups to use (you won’t be expanding/contracting more than one popup at a time)

---

<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:** [September 13, 2020, 10:10am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/7 "2020-09-13T10:10:22Z")

</div>

I have several open popup at the same time.  
I mange to pass x and y coordinate as param on each time I open it.  
Now I face new problem to solve. If user try to move popup the position change again and I don’t have any idea of new position. So reopening popup doesn’t open at new user position.

---

<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:** [September 13, 2020, 5:18pm UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/8 "2020-09-13T17:18:05Z")

</div>

My final result. Still having some glitches no match with Vision module but better than nothing.

 ![popup](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/8/88547cf84942a3c5911bfe8fbc25a4227a19de1b.gif)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 13, 2020, 10:33pm UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/9 "2020-09-13T22:33:20Z")

</div>

Unrelated question, but how have you done your pipes? In particular the rounded corners?  
(Your work always inspires me)

---

<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:** [September 14, 2020, 3:01am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/10 "2020-09-14T03:01:03Z")

</div>

Label with border and border radius. 😉

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 14, 2020, 3:27am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/11 "2020-09-14T03:27:57Z")

</div>

Haha not what I was expecting but it works. Thanks.  
Hopefully 8.1’s new piping component will offer rounded corners (and I hope the pipe pathing works as expected and is customisable)

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 14, 2020, 3:59am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/12 "2020-09-14T03:59:04Z")

</div>

> [@nminchin](#):
>
> Hopefully 8.1’s new piping component will offer rounded corners

Sounds to me like a coordinate container will finally have a great use! Lol

---

<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:** [September 25, 2020, 4:00pm UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/13 "2020-09-25T16:00:59Z")

</div>

You don’t believe it but I can recreate every response behavior with coordinator container like people use to web development in old days.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 25, 2020, 5:34pm UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/14 "2020-09-25T17:34:54Z")

</div>

So do you use more coordinate or flex containers? I feel like I probably use the following breakdown:

1. Flex - 80%
2. Breakpoint - 10%
3. Column - 5%
4. Tab - 3%
5. Coordinate 2%

---

<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:** [September 26, 2020, 4:52am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/15 "2020-09-26T04:52:47Z")

</div>

1. Coordinate - 60%
2. Flex - 35%
3. Column - 1%
4. Tab - 3%
5. Breakpoint 2%

The tab is not actually a container and you can recreate it by simply using embeded view and horizontal menu.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 26, 2020, 5:05am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/16 "2020-09-26T05:05:06Z")

</div>

> [@nader.chinichian](#):
>
> The tab is not actually a container and you can recreate it by simply using embeded view and horizontal menu.

I guess my question is, why would you do that? For a more customized look and feel?

A common use case for it on my end is to have a tab container embedded on a settings page, so I select a machine on the left hand side, and have multiple tabs worth of settings on the right side of the screen.

I have never used a tab container for an entire view though, only inside of other views

---

<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:** [September 26, 2020, 5:57am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/17 "2020-09-26T05:57:51Z")

</div>

Yes for better look and feel and also increase performance.  
Also you are right for common use case.  
I also use it for navigation on P&ID of the process.  
The rule of thumb, when ever you have overlapping object use coordinate container (any schematic of plant) and for user entry form type view use flex.

---

<div class="post-metadata">

**Author:** ![Enrico](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@Enrico](https://forum.inductiveautomation.com/u/Enrico)\
**Post date:** [November 22, 2021, 6:57pm UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/18 "2021-11-22T18:57:43Z")

</div>

Good evening.  
First of all: really nice work.  
I didn’t understand how you catch the position variation due to popup moving…  
Are you working with scripts in perspective to update the position? Or is it a simple way to get the xy coordinates of the popup view by popup id?

Thank you.

---

<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:** [November 23, 2021, 8:17pm UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/19 "2021-11-23T20:17:13Z")

</div>

I use event click for mouse that expose client.X and client.Y and use those for reopening the popup again in new postion

---

<div class="post-metadata">

**Author:** ![meet.shah](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@meet.shah](https://forum.inductiveautomation.com/u/meet.shah)\
**Post date:** [February 26, 2025, 9:43am UTC](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623/20 "2025-02-26T09:43:06Z")

</div>

I have found a best solution to this!

1. Open any mouse events.
2. Add Script in Organize actions.
3. Browse Properties (small icon on top right of script window)
4. Select View -\> Defaultsize -\> Height and width
5. Set it to size you want (With contents of expanded popup outside of default visible area)
6. Click OK and Save. You will see a scroll bar in perspective session on your popup when you do that mouse event.
7. In order to remove that, go to root -\> style -\> Misc -\> Overflow and select hidden. This removes the scroll bar!
