# Current Tab

**URL:** <https://forum.servoy.com/t/current-tab/333>\
**Category:** Classic Servoy\
**Created:** [September 16, 2003, 8:56pm UTC](https://forum.servoy.com/t/current-tab/333 "2003-09-16T20:56:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keenkenny](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@keenkenny](https://forum.servoy.com/u/keenkenny)\
**Post date:** [September 16, 2003, 8:56pm UTC](https://forum.servoy.com/t/current-tab/333/1 "2003-09-16T20:56:25Z")

</div>

Is there a way to capture the currently selected tab of a tab panel? For instance, can I determine what tab the user is currently viewing? Is this information I can capture and use within a method?

---

<div class="post-metadata">

**Author:** ![Jan\_Blok](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@Jan\_Blok](https://forum.servoy.com/u/Jan_Blok)\
**Post date:** [September 17, 2003, 8:12am UTC](https://forum.servoy.com/t/current-tab/333/2 "2003-09-17T08:12:21Z")

</div>

There is a property ‘tabIndex’ which represents the current tab  
example:  
-elements.tabpanelName.tabIndex = 2 //shows second tab  
-var currentTab = elements.tabpanelName.tabIndex;//gets the selected tab
