I have a handful of visual screens, each with an associated “control” screens (where one can see statuses, setpoints, etc…). During day to day operation the typical tab strip navigation has become cumbersome. My idea is to replace a button on the tab strip with a button that navigates to an associated screen via a switch statement.
In this case, the associated screens are 6 and 1, 2 and 5, and 3 and 4. The idea is that when the button is pressed while on screen 6, you are navigated to screen 1 - and vice versa.
Any suggestions as to the direction I should head in order to make this work?
For this you can use any component you would like. For example, you can bring in a regular button component and bind the text of the component to the current window tag [System]/Client/User/CurrentWindow.
When the user clicks on the button you can easily swap to another window. So put the following script on the actionPerformed event of the button:
currentWindow = system.tag.getTagValue("[System]/Client/User/CurrentWindow")
if currentWindow == "SCREEN1":
elif currentWindow == "SCREEN2":
elif currentWindow == "SCREEN3":
elif currentWindow == "SCREEN4":
elif currentWindow == "SCREEN5":
system.nav.swapTo("SCREEN1")My example uses the typical navigation strategy where only one main (maximized) window is open at a time held the in the current window variable. The swapTo function will simply close the current one and open the new one. Hope this helps.
Thank you - the button works perfectly.
I have a similar issue where I have made 4 screens inside a tab coordinate container. Then there is another overview page containing all 4 screens in a smaller resolution of the containers each screen belongs to. So I want to cover the small screens with invisible buttons that will redirect the user to the relative tab. It doesnt seem to work correctly as when I configure on the button events “navigation” it will only allow me to bring the whole tab container always starting from the 1st tab. So is there a way to link directly the tab number screen if that makes sense?