I would like to create a collection of controls that scale relative to one another.
Since I do not have a fill anchor setting, I cannot access h/w from script for container objects, and there is no resize event…
The final control will be more complex, but in its most simple form, imagine a container I wanted to have two distinct sections divided at half window width.
The final control will have selection buttons and screen displays, I want the buttons to stay their designed h/w the text displays I want to scale into the available space.
Suggestions or just no such creature?
It looks like I may be able to do this with nested templates.
In the mean time if there are any other suggestions feel free to contribute.
Well, there’s a little script you can do to resize your containers when the window opens, but that requires that you use the invokeLater() function to get the timing right. Try putting this script into your window’s visionWindowOpened event. (You need to change the names for your containers though).
# get the height and width
height = event.source.height
width = event.source.width
# set the containers to half the width of the screen
# use system.gui.reshapeComponent(comp,x,y,width,height)
container1 = event.source.getRootContainer().getComponent('Left Container')
container2 = event.source.getRootContainer().getComponent('Right Container')