# tabpanel getTabIndex

**URL:** <https://forum.servoy.com/t/tabpanel-gettabindex/431>\
**Category:** Classic Servoy\
**Created:** [October 14, 2003, 8:48am UTC](https://forum.servoy.com/t/tabpanel-gettabindex/431 "2003-10-14T08:48:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marceltrapman\_planet.nl](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@marceltrapman\_planet.nl](https://forum.servoy.com/u/marceltrapman_planet.nl)\
**Post date:** [October 14, 2003, 8:48am UTC](https://forum.servoy.com/t/tabpanel-gettabindex/431/1 "2003-10-14T08:48:49Z")

</div>

I need to use the index of a tabpanel. So i use setTabIndex and getTabIndex.

setTabIndex works like a charm!

getTabIndex however is formatted like ‘number getTabIndex(number)’. I can’t get it to work properly.

How can I get it to work or is there something wrong?

Thanks,

Marcel

---

<div class="post-metadata">

**Author:** ![maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@maarten](https://forum.servoy.com/u/maarten)\
**Post date:** [October 14, 2003, 10:19am UTC](https://forum.servoy.com/t/tabpanel-gettabindex/431/2 "2003-10-14T10:19:30Z")

</div>

this should work:

get active tab:  
var x = elements.tabPanel.tabIndex

set active tab:  
elements.tabPanel.tabIndex = 2

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [October 14, 2003, 5:23pm UTC](https://forum.servoy.com/t/tabpanel-gettabindex/431/3 "2003-10-14T17:23:20Z")

</div>

Hello maarten,

Sorry, but this doesn’t work, I get an errormessage that tabIndex is unknown. I am now downloading the newest beta (is it in here?)

Marcel

---

<div class="post-metadata">

**Author:** ![maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@maarten](https://forum.servoy.com/u/maarten)\
**Post date:** [October 14, 2003, 7:16pm UTC](https://forum.servoy.com/t/tabpanel-gettabindex/431/4 "2003-10-14T19:16:38Z")

</div>

I tested with Version R2 1.2rc5-build 257

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [October 14, 2003, 7:44pm UTC](https://forum.servoy.com/t/tabpanel-gettabindex/431/5 "2003-10-14T19:44:12Z")

</div>

Thanks maarten, however… This discussion will float from the original and I hope you don’t mind my posting further here.

I have not been able to install the new build without loosing my application data! Installing fresh and moving the db to the directory or installing over the original data didn’t show my application anymore.

Hope you can help me out on this one although I will go through the forum on the subject too..

Marcel

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [October 15, 2003, 6:27pm UTC](https://forum.servoy.com/t/tabpanel-gettabindex/431/6 "2003-10-15T18:27:09Z")

</div>

Thanks Maarten,

All issues solved with the latest release and your tips!

Ciao,

Marcel
