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.
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 (9.11 KB)
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.
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.