# Change the selected tab

**URL:** <https://forum.servoy.com/t/change-the-selected-tab/15511>\
**Category:** Classic Servoy\
**Created:** [February 14, 2012, 11:40am UTC](https://forum.servoy.com/t/change-the-selected-tab/15511 "2012-02-14T11:40:17Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pentamsi](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@pentamsi](https://forum.servoy.com/u/pentamsi)\
**Post date:** [February 14, 2012, 11:40am UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/1 "2012-02-14T11:40:17Z")

</div>

Hello, I want to know if are any form to change the selected tab panel in the frameowrk, in the related tabs of the form.

![](https://canada1.discourse-cdn.com/flex010/uploads/servoy/optimized/2X/b/b5a1f7a1439c3b46f5d078d484026f3f02782e60_2_690x32.png)

Actually this is the tabs, and i want to change to one or other programaticaly, if this posible? I need this because I enable or disable some tabs depending of some parameters.

---

<div class="post-metadata">

**Author:** ![studiomiazzo](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@studiomiazzo](https://forum.servoy.com/u/studiomiazzo)\
**Post date:** [April 4, 2012, 7:59am UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/2 "2012-04-04T07:59:19Z")

</div>

one solution could be

```auto
globals.svy_nav_switchTabProgram(_event,_programName)

```

where \_programName is the name of the program bound to the tab you want to select

---

<div class="post-metadata">

**Author:** ![studiomiazzo](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@studiomiazzo](https://forum.servoy.com/u/studiomiazzo)\
**Post date:** [April 4, 2012, 12:19pm UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/3 "2012-04-04T12:19:41Z")

</div>

Another question is : is it possible to programmatically enabling/disabling some of these tabs?

---

<div class="post-metadata">

**Author:** ![sanneke](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@sanneke](https://forum.servoy.com/u/sanneke)\
**Post date:** [April 4, 2012, 12:24pm UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/4 "2012-04-04T12:24:11Z")

</div>

Both items are possible. But we have to invest some time to look what the exact code should be.

---

<div class="post-metadata">

**Author:** ![studiomiazzo](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@studiomiazzo](https://forum.servoy.com/u/studiomiazzo)\
**Post date:** [April 4, 2012, 1:08pm UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/5 "2012-04-04T13:08:24Z")

</div>

I’m currently looking into the framework code, I’ll find it sooner or later…  
 ![;)]( "Wink")

---

<div class="post-metadata">

**Author:** ![sanneke](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@sanneke](https://forum.servoy.com/u/sanneke)\
**Post date:** [April 13, 2012, 10:36am UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/6 "2012-04-13T10:36:28Z")

</div>

In the new version we will have two methods that will help you:

New - globals.svy\_nav\_getVisibleFormNames() : Get the formnames that are showing at the moment in the order of the template  
New - globals.svy\_nav\_getVisiblePanelNames() : Get the formnames of the tabpanels where the forms are set on, in the order of the template.

---

<div class="post-metadata">

**Author:** ![sanneke](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@sanneke](https://forum.servoy.com/u/sanneke)\
**Post date:** [April 13, 2012, 11:11am UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/7 "2012-04-13T11:11:42Z")

</div>

globals.svy\_nav\_switchTabProgram(\_event,\_programName)

Is working again in the next version.

It will determine on which panel the tab is, and then switch to it.

---

<div class="post-metadata">

**Author:** ![pentamsi](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@pentamsi](https://forum.servoy.com/u/pentamsi)\
**Post date:** [April 13, 2012, 2:01pm UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/8 "2012-04-13T14:01:57Z")

</div>

Okey, thanks for all sanneke!

---

<div class="post-metadata">

**Author:** ![studiomiazzo](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@studiomiazzo](https://forum.servoy.com/u/studiomiazzo)\
**Post date:** [April 13, 2012, 9:05pm UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/9 "2012-04-13T21:05:54Z")

</div>

That sounds good!  
i haven’t already found how to enable or disable those tabs… or just how to block the current panel…  
maybe i could go into the “go to edit mode” code…

---

<div class="post-metadata">

**Author:** ![sanneke](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@sanneke](https://forum.servoy.com/u/sanneke)\
**Post date:** [April 16, 2012, 7:14am UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/10 "2012-04-16T07:14:40Z")

</div>

Now you have the panelFormname and the tab name ‘tab’, you can just use servoy function to enable and disable tabs.

---

<div class="post-metadata">

**Author:** ![studiomiazzo](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@studiomiazzo](https://forum.servoy.com/u/studiomiazzo)\
**Post date:** [June 27, 2012, 10:52am UTC](https://forum.servoy.com/t/change-the-selected-tab/15511/11 "2012-06-27T10:52:54Z")

</div>

I’m back with a question…  
I am using 6.0.6 with the old framework. Say that I have a situation like the one attached down here:  
[attachment=0]program\_example.jpg[/attachment]  
Is there a way in which I can make one of these panel not visible (or removing it)?  
My purpose is to show/hide the third tab accordingly to the value of a specific variable.  
Thanks in advance.

 ![program_example.jpg](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/3/3773b00d06114934859f53893d6c4becf480ede3.jpeg)
