Simple Tab Panel question

I want to build a form that will have a tabless tab panel with serveral tabs (if that makes sense)
I want to be able to show the visibility of one tab based on a agrument

I figured I could have a on show method that would hide all tabs, then run an agrument

if (value == ‘A’)

tab panel 1 is visible.

From what I can tell, I cannot reach the tabs through the element tree.

I know I can create several tabless tabpanels stacked over each other and reach the visibilty element for each one, but is seems like it would be messy, and would involve allot of redundent code.

Is there a function I am over looking to avoid having several tabless panels, V.S. several tabs within on tabless panel.

Thanks for any insight.

Erich

Erich,

If I understand what you’re trying to do, uou could use the following onShow method. I think you’ll also need to use a custom controller and add this to the end of your next/previous record method.

if (value == 'A')
{
	elements.tabs_70.visible = true
	elements.tabs_70.tabIndex = 1
}
if (value == 'B')
{
	elements.tabs_70.visible = true
	elements.tabs_70.tabIndex = 2
}
else
{
	elements.tabs_70.visible = false
}

Excellent, I will give it a try
Thanks

Thanks Greg,
Worked well, I just had to remove the else statment, no controller issues either.

Instead of hiding and showing the tab panel, you can put a blank form in slot 1 and then change the tab index as needed.

David,

Thanks for the tip, since there will always be a condition met per record, I will never have a need for a blank form, but thats a good idea that may work somewhere in the future.

I dont have to do hide anything I just run this method onshow, and there seems to be no conflicts.

if (equipment_classification == ‘Flexible Endoscope’)
{
elements.tabs_70.visible = true
elements.tabs_70.tabIndex = 1
}

else if (equipment_classification == ‘Rigid Endoscope’)
{
elements.tabs_70.visible = true
elements.tabs_70.tabIndex = 2
}

Thanks,
Erich