# Identifying the current tabpanel from the controller

**URL:** <https://forum.servoy.com/t/identifying-the-current-tabpanel-from-the-controller/2864>\
**Category:** Classic Servoy\
**Created:** [October 8, 2004, 3:56pm UTC](https://forum.servoy.com/t/identifying-the-current-tabpanel-from-the-controller/2864 "2004-10-08T15:56:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morley](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@Morley](https://forum.servoy.com/u/Morley)\
**Post date:** [October 8, 2004, 3:56pm UTC](https://forum.servoy.com/t/identifying-the-current-tabpanel-from-the-controller/2864/1 "2004-10-08T15:56:08Z")

</div>

Is it possible to identify the current tabpanel from a method running in a custom controller? The getName() function returns the name of the controller itself.

---

<div class="post-metadata">

**Author:** ![automazione](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@automazione](https://forum.servoy.com/u/automazione)\
**Post date:** [October 8, 2004, 4:20pm UTC](https://forum.servoy.com/t/identifying-the-current-tabpanel-from-the-controller/2864/2 "2004-10-08T16:20:19Z")

</div>

> Developer Move Sampe:  
> //Set / Get the selectedTabIndex  
> var current = tabpanel.tabIndex;  
> tabpanel.tabIndex = current+1;

> Servoy Developer Volume ll Reference Guide on page 222:  
> Property tabIndex  
> Description Gets or sets the selected tab (array) index for the specified tabpanel.  
> Example //gets the selected tab index of the tabpanel  
> var current = forms.orders.elements.infoTab.tabIndex;  
> //sets (goes to) the selected tabIndex of the tabpanel  
> forms.orders.elements.infoTab.tabIndex = current + 1;

---

<div class="post-metadata">

**Author:** ![bcusick](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@bcusick](https://forum.servoy.com/u/bcusick)\
**Post date:** [October 8, 2004, 4:22pm UTC](https://forum.servoy.com/t/identifying-the-current-tabpanel-from-the-controller/2864/3 "2004-10-08T16:22:35Z")

</div>

The documentation ROCKS!

Bob

---

<div class="post-metadata">

**Author:** ![Morley](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@Morley](https://forum.servoy.com/u/Morley)\
**Post date:** [October 8, 2004, 4:59pm UTC](https://forum.servoy.com/t/identifying-the-current-tabpanel-from-the-controller/2864/4 "2004-10-08T16:59:35Z")

</div>

Fabulous!! I looked under “get” in the index. Didn’t find it there, didn’t think of looking under “tabIndex”.

Much thanks for the quick response. This will solve a lot of problems.

General appreciation to all who have been posting responses. As yet it’s rather rare for me to know the answers to others’ questions, there’s so much to learn. Eventually I’ll assuage my guilt about being always on the receiving end. ![:)]( "Smile")
