Hi, I’m trying to resize proportionally all the components in a window using a slider.
I succeed in resizing only the main window, but I would resize even the contained components.
In order to do this, I think that I need a method to iterate a component that belongs to a rootContainer, for instance something like that:
window = system.gui.getWindow("Win")
components = window.getRootContainer().getComponents()
for c in components:
system.gui.resizeComponent(c, width, height)
It is possibile to do something like that? I have searched in the support website but without success.
Thanks
Daniel
Yes, you can iterate through a container’s components with the loop you show. To be sure you catch everything in a window, you’ll need to do so recursively for containers within containers.
As to your problem: I’m not exactly sure what you are trying to achieve, but you’ll need to capture the original sizes of all of these components in order to apply a scaling factor. Your position is likely to need to change, too, not just size. Is there a reason the normal relative layout won’t work for you?
However, when I zoom the Ignition Window content beyond the window’s size, I would like the window scrollbars to appear. How can I achieve this? thanks
[quote=“DanCas”]However, when I zoom the Ignition Window content beyond the window’s size, I would like the window scrollbars to appear. How can I achieve this? thanks[/quote]Hmm. The application’s scroll bars should appear as soon as any part of the window’s outline exceeds the app window boundary. Windows within the app are not capable of displaying scroll bars.