# Color for Tabpanel Tabs

**URL:** <https://forum.servoy.com/t/color-for-tabpanel-tabs/937>\
**Category:** Classic Servoy\
**Created:** [January 2, 2004, 4:31pm UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937 "2004-01-02T16:31:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![idoctor](https://avatars.discourse-cdn.com/v4/letter/i/a88e4f/32.png) [@idoctor](https://forum.servoy.com/u/idoctor)\
**Post date:** [January 2, 2004, 4:31pm UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937/1 "2004-01-02T16:31:37Z")

</div>

I would like to be able to change the color of a tab in a tabpanel if the data for that tabs form is incomplete or contains critical information.  
It would be very useful if the tabs on the tab panels could be adressed as elements in methods so that one could programatically control the color of the tabs.

John McCann

---

<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:** [January 5, 2004, 2:54pm UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937/2 "2004-01-05T14:54:34Z")

</div>

> idoctor:  
> I would like to be able to change the color of a tab in a tabpanel if the data for that tabs form is incomplete or contains critical information.

Not possible due to LAF API (Apple/SUN)

> idoctor:  
> It would be very useful if the tabs on the tab panels could be adressed as elements in methods so that one could programatically control the color of the tabs.

Is on the planning.

---

<div class="post-metadata">

**Author:** ![idoctor](https://avatars.discourse-cdn.com/v4/letter/i/a88e4f/32.png) [@idoctor](https://forum.servoy.com/u/idoctor)\
**Post date:** [January 6, 2004, 6:42am UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937/3 "2004-01-06T06:42:24Z")

</div>

Jan,

I think it would be a very useful function, if you can figure out a way to color those tabs. It is a very nice way of signalling that the form that underlies the tab requires some attention (has fields that require data,has critical data…) I have taken note that you guys have come through with everything else you have told me you are planning. Keep it up.

Thanks

John McCann

---

<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:** [January 6, 2004, 9:35am UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937/4 "2004-01-06T09:35:20Z")

</div>

After relooking it up I concluded that it is possible after all in the API…the following methods are added on a tab panel:  
setTabFGColorAt(1, ‘#00ff00’)  
setTabBGColorAt(2, ‘#ff0000’)

Will be available in Servoy 2.0b6

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [January 6, 2004, 10:31am UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937/5 "2004-01-06T10:31:43Z")

</div>

Hi, adding to this one: could it be possible to hide a tab (not all tabs but one) by a method? I have tabs that I don’t want to show all the time…

Thanks  
Patrick

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [January 6, 2004, 10:38am UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937/6 "2004-01-06T10:38:34Z")

</div>

> setTabFGColorAt(1, ‘#00ff00’)  
> setTabBGColorAt(2, ‘#ff0000’)

After doing this, is there a way, to bring the color back to default??  
(I mean the values, which are set in developer?)

---

<div class="post-metadata">

**Author:** ![pbakker](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pbakker](https://forum.servoy.com/u/pbakker)\
**Post date:** [January 6, 2004, 11:31am UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937/7 "2004-01-06T11:31:31Z")

</div>

The hiding of tabs was allready requested by me. ![:-)]( "Smile") Jan added it to the planning.

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [January 6, 2004, 11:35am UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937/8 "2004-01-06T11:35:40Z")

</div>

just tried to make sure that it is not forgotten ![:wink:]( "Wink")

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/1X/363c5924e316baabbea11f046f1e2f3db64fbf70.jpeg) [@system](https://forum.servoy.com/u/system)\
**Post date:** [January 10, 2004, 8:51pm UTC](https://forum.servoy.com/t/color-for-tabpanel-tabs/937/9 "2004-01-10T20:51:36Z")

</div>

I used the new command for coloring the individual tabs. Works great. I use it to let the user determine if all required data under a tab has been entered. I am sure others will find many other uses for it. A great addition!

Thanks

John McCann
