I was implementing this specific condition where I want to control the current active tab. The following is the scenario.
I have made use of tabs “2“ widget. And Tab1 has 8 tabbed options(a,b,c,d,e,f,g,h) and Tab2 has 2 tabbed options(x,y). Now the current active tab by default should be Tab1 and 1st tabbed option in it(a), they can switch tabs as they want by choosing (a-h). The issue is if the user clicks on Tab2, I should default it to (x) and also no longer make any of the tabbed option in Tab1 as active(i.e; active tab should only be one that is current or selected latest). Is this possible and how?
Thanks
Hi @Benutzer7, can you explain a bit more the workflow behind? Do you have two different tabbed containers or are you trying to control one section through two tab widgets? Also what are they are used for? I am not fully clear what you try to achieve so my explanations are only based on interpretations.
Currently my interpretation is that tab 2 could be some form of a mode on/off and each tab 1 (a-h) is different mode to be set active ? If that’s the case you have multiple options.
Set with a click on tabs 2 always tabs 1 to a default and set a tabs1-edtiable bool false. Use this to deactivate or hide every tab in tabs 1.
Variable backed tab selection. Create 3 string variables tab1 selected, tab2 selected and one resulting active-tab variable. Each click on a tab actually not emits the tab change event but utilizes the set variable to set static strings as tab1 / tab2 selected. Lastly you “resulting active tab” is a variable transformation where you have full control via if-else cases.
So, the issue where I was struck was; there were 2 different sections each of which had tabs. But there was no link between these.
I now made use of a variable which will be reset to the tab that was selected currently(latest). And the other issue where I was not able to indicate specific tab as active due to 2 tab sections is solved by including all the tabs available into a seperate TABBED section which is hidden(a trick). So, now it there will be no 2 active tabs at once.