Hello all,
Have a rather annoying problem I would like to clean up on a vision project.
The project uses a tab strip with 5 tabs. Everything works pretty well, however, when I select a tab to go to a new page I need to click the tab twice in order for the tab to highlight. If I only click once a different tab goes in focus.
Anybody have any ideas why this is? Is there a property that controls this?
Here is the main page when you open the project:
And then here is the "Inventory" page after one click - notice that "Transactions" is in focus on the Tab Strip:
And here is the "Inventory" page after two clicks - now the "Inventory" tab is in focus:
For a tab strip's built-in navigation to work reliably, any main window navigation that doesn't happen from the tab strip absolutely must use system.nav.swapTo()
. Use of any other main window navigation will confuse the tab strip and can make this kind of problem show up.
Audit all of your scripts and any other navigation to make sure you are not using system.nav.openWindow()
or system.nav.swapWindow
for any main windows.
1 Like
This is really helpful information. Thank you!
Unfortunately I do not have any other navigation between main windows using the openWindow() or swapWindow() system functions. I do, however have a submit button that uses openWindow() to launch a pop-up window, but I feel like I need that in order to maintain the pop-up functionality.
If you look in the top menu, under 'Windows', do you see exactly one main window (plus or minus your popup), or are you seeing multiple "primary" content windows? That's your way to confirm you're not running into the issue Phil mentioned.
You can also put a debug label somewhere on screen bound to the [System]Client/CurrentWindow
tag; that tells you what the system thinks the current active "main" window is (and is what's used to highlight the tab on the tab strip by default).
3 Likes
Thank you! This was super helpful and helped me get down to the root cause.
I actually just didn't really know the right way to insert a tab strip into my project. I actually added it to all of my main windows and had multiple instances of it instead of creating a docked window with only one instance of the tab strip.
Thank you so much for helping out as your feedback prompted me to dig a little deeper.
1 Like