| Author |
Message |
|
Step7
General
Joined: Thu May 17, 2007 4:56 pm Posts: 501 Location: Ohio
|
 Container Scaling
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.
|
| Tue Jul 24, 2012 4:47 am |
|
 |
|
Carl.Gould
Moderator
Joined: Sun Apr 02, 2006 2:46 pm Posts: 3872 Location: Sacramento, CA
|
 Re: Container Scaling
1) How are you resizing it? 2) Does it act differently if it isn't grouped?
_________________ Carl Gould
Software Development
Inductive Automation
|
| Fri Jul 27, 2012 3:35 pm |
|
 |
|
Step7
General
Joined: Thu May 17, 2007 4:56 pm Posts: 501 Location: Ohio
|
 Re: Container Scaling
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.
|
| Sun Jul 29, 2012 5:34 pm |
|
 |
|
michael.stofan
Moderator
Joined: Fri Dec 04, 2009 9:02 am Posts: 169
|
 Re: Container Scaling
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.
|
| Wed Aug 08, 2012 10:17 am |
|
 |
|
Jonathan
General
Joined: Thu Jul 31, 2008 2:08 pm Posts: 363 Location: Chico, CA
|
 Re: Container Scaling
will this be fixed in an up coming release?
_________________ Jonathan
|
| Thu Aug 09, 2012 1:04 pm |
|
 |
|
Carl.Gould
Moderator
Joined: Sun Apr 02, 2006 2:46 pm Posts: 3872 Location: Sacramento, CA
|
 Re: Container Scaling
Yes, but it won't make 7.5.2. Probably 7.5.3
_________________ Carl Gould
Software Development
Inductive Automation
|
| Thu Aug 09, 2012 3:11 pm |
|
 |
|
Sander
Cadet
Joined: Tue Sep 25, 2012 5:17 am Posts: 4
|
 Re: Container Scaling
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)
|
| Tue Sep 25, 2012 6:22 am |
|
 |
|
Sander
Cadet
Joined: Tue Sep 25, 2012 5:17 am Posts: 4
|
 Re: Container Scaling
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.
|
| Tue Sep 25, 2012 7:22 am |
|
 |
|
Sander
Cadet
Joined: Tue Sep 25, 2012 5:17 am Posts: 4
|
 Re: Container Scaling
...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.
|
| Tue Sep 25, 2012 7:27 am |
|
 |
|
Carl.Gould
Moderator
Joined: Sun Apr 02, 2006 2:46 pm Posts: 3872 Location: Sacramento, CA
|
 Re: Container Scaling
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.
_________________ Carl Gould
Software Development
Inductive Automation
|
| Tue Sep 25, 2012 12:37 pm |
|
 |
|
Sander
Cadet
Joined: Tue Sep 25, 2012 5:17 am Posts: 4
|
 Re: Container Scaling
Will it be possible in a later release?
|
| Wed Sep 26, 2012 11:07 pm |
|
 |
|
Carl.Gould
Moderator
Joined: Sun Apr 02, 2006 2:46 pm Posts: 3872 Location: Sacramento, CA
|
 Re: Container Scaling
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.
_________________ Carl Gould
Software Development
Inductive Automation
|
| Thu Sep 27, 2012 7:46 am |
|
 |
|