Our system has a TabStrip component in a left window that updates the main display when an tabitem is clicked. However, intermittently after pressing a tabitem, the tab item will not update the display even though it shows that the clicked tabitem was selected.
Our tabstrip component uses cell update for all color values (background/foreground, unselected/selected/hover) from client tags
There is only 1 main (floating) window configured to startup.
There are 3 docking windows configured to startup.
Our system is Windows 10, Ignition 8.1.0, 16GB Ram
This behaviour was observed on Vision Clients running on Windows 10 and MacOS 10.15.7.
I’ve seen this when I’ve accidentally set my nav to open instead of swap. When it happens, try using ctrl+tab to cycle between open windows and see if there are any more open that shouldn’t be
For now the workaround is to click a different tab (2) from the tab you just clicked (1) and then click first tab (1) again.
It is frustrating for the operators because sometimes it works the first time and sometimes it you need to do the workaround.
You can try putting this code in the mouseEntered action on the root container of the docked window which contains the tab strip. It will put that window in focus as soon as the mouse pointer enters the that window and it’s contents to more gracefully be used:
It’s not working because you’re using openWindow instead of swapWindow. Main windows should be opened with swap, popups should be opened with open. Using open on main windows will open the new window on top of any others previously opened, and by default will only ever open one instance at a time. Therefore when you try to open one again, because it’s already opened, the function won’t do anything, including bringing it to the front.
Umm. I have a docked window on the left with a tab strip. @rpavlicek suggested to put the code into the mouseEntered event handler action of the root container of the docked window and the intent of the code is to put the docked window into focus.
I believe he is suggesting the problem is due to the window losing its focus and so the first click puts the window in focus and subsequent click would then show the appropriate main window.
@rpavlicek code is to show the docked window, not the main window.
I believe the problem is not related to focus because subsequent clicks on the same tab does not show the appropriate main window.
My workaround is to click a different tab on the tab strip and then click back to the first tab to show the appropriate main window.
Sorry, I just skimmed your reply. I still think the issue is calling openWindow somewhere.
You can check if more than one main window is open with a button somewhere that runs:
windows = system.gui.getOpenedWindowNames()
CSV = ','.join(windows)
system.gui.messageBox(CSV)
When the issue occurs, run this and check if you have more than one main window opened
Also, using that script to openWindow will only make your problem worse, as you then have lots of main windows opened. OpenWindow also doesnt focus that window if it’s already opened behind another opened main window
Each Windows opened with openWindow also starts its own navigation history, so you’ll also have no nav history either with Windows opened with openWindow
User swaps to a new screen using tab strip.
User then uses a button to open a new screen.
User tries to swap back to previous screen using tab strip.
Tab strip correctly says it swapped back to previous screen but that isn’t what the user sees; the user sees the opened screen from using the button.
Anyways, I used this script successfully to identify where I was opening screens instead of swapping to them. No more tab strip problems.