# Container Scaling

**URL:** <https://forum.inductiveautomation.com/t/container-scaling/4867>\
**Category:** Ignition\
**Created:** [July 24, 2012, 12:47pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867 "2012-07-24T12:47:35Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [July 24, 2012, 12:47pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/1 "2012-07-24T12:47:35Z")

</div>

Ok, I have a container that contains a slider and bar chart. I’ve grouped the container, and if I change the size of it in the designer, the bar chart and slider change size accordingly.

But, if I change the size of the container at runtime through script, the bar chart and slider do not change proportionally with the container. Is this what you would expect?

What I’m trying to do is allow the user to use the slider to select the number of days of data to report, and as the days increase, the bar chart stretches.

---

<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:** [July 27, 2012, 11:35pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/2 "2012-07-27T23:35:20Z")

</div>

1. How are you resizing it?
2. Does it act differently if it isn’t grouped?

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [July 30, 2012, 1:34am UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/3 "2012-07-30T01:34:15Z")

</div>

I take the slider value and multiply it by a constant for now. I use the resize component function, and set the container size.

The only difference between grouped and ungrouped is the size of the bar chart. It works fine if I grab the handles and resize the container in the designer, and was hoping to duplicate this at runtime.

I’ve attached the window.

edit: Forgot to mention that the script for resizing the container is on the slider.  
[ScalingContainer.vwin](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/2b1a461315101bbf0bd6a277b6e6b9c06edd6176.vwin) (9.11 KB)

---

<div class="post-metadata">

**Author:** ![Michael.Stofan](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.stofan/32/3342_2.png) [@Michael.Stofan](https://forum.inductiveautomation.com/u/Michael.Stofan)\
**Post date:** [August 8, 2012, 6:17pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/4 "2012-08-08T18:17:08Z")

</div>

It looks like we’ve got a bug in the layout system. Currently a container, when re-sized in run-time, doesn’t redo it’s own internal layout. This means that any children components will not be able to re-size themselves properly.

The workaround for now would be to handle the re-sizing of any applicable child components yourself using the same type of script you used for the container re-sizing.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [August 9, 2012, 9:04pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/5 "2012-08-09T21:04:30Z")

</div>

will this be fixed in an up coming release?

---

<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:** [August 9, 2012, 11:11pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/6 "2012-08-09T23:11:24Z")

</div>

Yes, but it won’t make 7.5.2. Probably 7.5.3

---

<div class="post-metadata">

**Author:** ![Sander](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@Sander](https://forum.inductiveautomation.com/u/Sander)\
**Post date:** [September 25, 2012, 2:22pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/7 "2012-09-25T14:22:09Z")

</div>

Any updates about the bugfix? …I noticed that it didn’t make it to the current release (version 7.5.3)

I am also trying to rotate the container component. Is this possible?

Tried the folowing with Script:

1. Container.angleDegrees (it worked for the group component)

---

<div class="post-metadata">

**Author:** ![Sander](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@Sander](https://forum.inductiveautomation.com/u/Sander)\
**Post date:** [September 25, 2012, 3:22pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/8 "2012-09-25T15:22:54Z")

</div>

Instead of the container component I tried the template component. The resizing works as aspected with that object. Make sure not to forget to check the “Enable Layout” propertie of the template object. Otherwise it will stretch the child components of the template rather then listening to the Layout constraints.

---

<div class="post-metadata">

**Author:** ![Sander](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@Sander](https://forum.inductiveautomation.com/u/Sander)\
**Post date:** [September 25, 2012, 3:27pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/9 "2012-09-25T15:27:21Z")

</div>

…I Forgot to mention that I couldn’t find a solution to make the Template Instance to Rotate.

So any help would still be welcome.

---

<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:** [September 25, 2012, 8:37pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/10 "2012-09-25T20:37:55Z")

</div>

The runtime script-enabled container scaling issue is still outstanding, sorry about the delay.

Rotating a normal container or a template is simply not supported, that’s why you can’t find a way to do it.

---

<div class="post-metadata">

**Author:** ![Sander](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@Sander](https://forum.inductiveautomation.com/u/Sander)\
**Post date:** [September 27, 2012, 7:07am UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/11 "2012-09-27T07:07:46Z")

</div>

Will it be possible in a later release?

---

<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:** [September 27, 2012, 3:46pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/12 "2012-09-27T15:46:03Z")

</div>

The container scaling issue will be resolved, in an upcoming release, probably 7.7.0.

There are no plans to have containers or templates be rotate-able, however.

---

<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:** [March 21, 2014, 8:49pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/13 "2014-03-21T20:49:00Z")

</div>

This has been fixed in Ignition 7.6.5.

> [@](#):
>
> "Fixed - Re-sizing a container using system.gui.reshape or system.gui.resize now respects and  
> preserves the layout of the interior contents of the container."

---

<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:** [April 15, 2014, 10:08pm UTC](https://forum.inductiveautomation.com/t/container-scaling/4867/14 "2014-04-15T22:08:44Z")

</div>

You will find this in 7.6.6 since 7.6.5 was taken down
