Tab Strip control

For the Tab Strip object:

Allow us to enable/disable individual tabs based on role and/or from a script.

1 Like

You can disable the tab strip:

rootContainer = system.gui.getParentWindow(event).rootContainer
tab = rootContainer.getComponent("Tabs")
tab.componentEnabled = 0 #or 1

You can also change which tab is selected:

if not tab.componentEnabled:
	tab.selectedTab = "Default Tab"

[quote=“adamaustin”]You can disable the tab strip:

rootContainer = system.gui.getParentWindow(event).rootContainer
tab = rootContainer.getComponent("Tabs")
tab.componentEnabled = 0 #or 1

You can also change which tab is selected:

if not tab.componentEnabled: tab.selectedTab = "Default Tab" [/quote]

I understand – and have used these features.

I was asking for additional functionality for the tab strip control: to alter the visibility of individual tabs on the strip via roles or scripting – not the entire tab strip. This would allow me to hide or display tabs based on user security, machine state, etc.

If you put the data for the tab strip dataset in a SQL table, then you can bind the tab strip dataset to a query of that table, adding your security and other factors into the query to show whichever tabs you want at any time.

I create a string type Client tag, and bind the tab strip dataset to that tag. I then build a query string in a script, so I can be as complex with it as needed, and finally write that string to the Client Tag when done. The tab strip then appears as the query string in the Client tag dictates.