# Change the width of tabs in tabbedComponent buttonBar

**URL:** <https://forum.juce.com/t/change-the-width-of-tabs-in-tabbedcomponent-buttonbar/23305>\
**Category:** General JUCE discussion\
**Created:** [July 13, 2017, 10:24am UTC](https://forum.juce.com/t/change-the-width-of-tabs-in-tabbedcomponent-buttonbar/23305 "2017-07-13T10:24:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TobyKrotos](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@TobyKrotos](https://forum.juce.com/u/TobyKrotos)\
**Post date:** [July 13, 2017, 10:24am UTC](https://forum.juce.com/t/change-the-width-of-tabs-in-tabbedcomponent-buttonbar/23305/1 "2017-07-13T10:24:36Z")

</div>

Hi there, I’m trying to figure out how to change the width of the tabs on a tabbedComponent with the orientation set to TabbedButtonBar::Orientation::TabsAtTop.

In this configuration it’s very straight forward to change the height of the buttons by calling:

void TabbedComponent::setTabBarDepth (const int newDepth);

but it seems quite involved to change the width of the very same buttons. Am I missing something? Is there a simple way of doing this or am I going to have to sub class some stuff? Thanks!

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [July 13, 2017, 10:45am UTC](https://forum.juce.com/t/change-the-width-of-tabs-in-tabbedcomponent-buttonbar/23305/2 "2017-07-13T10:45:53Z")

</div>

Override `LookAndFeel::getTabButtonBestWidth` in your LookAndFeel subclass.

---

<div class="post-metadata">

**Author:** ![TobyKrotos](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@TobyKrotos](https://forum.juce.com/u/TobyKrotos)\
**Post date:** [July 13, 2017, 11:30am UTC](https://forum.juce.com/t/change-the-width-of-tabs-in-tabbedcomponent-buttonbar/23305/3 "2017-07-13T11:30:01Z")

</div>

success! Thanks so Much Dave
