Access root container on different page

Hello,

I am using Vision.

As the title says, my question is if there is a way to access the components from a root container, on a different page than it is addressed from.

I have one window with buttons, that I would like to make a change on a different page, but without the use of internal memory tags. Therefore, a direct way to address the root container on the page is required.

Thanks in advance.

You can use system.gui.getOpenedWindows() to get a reference to the window, and then get access to any component from there. I’m away from my computer at the moment so can’t really write out a reference script.

You can look in the manual for an example of how to use that function.

Or just use system.gui.getWindow() if you know the window name.

1 Like

And from here

window = system.gui.getWindow("Some window path")
rc = window.getRootContainer()
# at this point you can chain together getComponent's 
# to get what you need if its nested inside other components/containers
someComponent = rc.getComponent("someComponent")
2 Likes

Thanks for all your reply’s :slight_smile:
Made it work