How to make horizontal separation between tabs on TabContainer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wojtasss

in Custom Constants HSeperation doesn’t work :frowning:

:bust_in_silhouette: Reply From: njamster

That’s because hseperation is the distance between the text and icon of a tab, see this issue. If you want to create gaps between the tabs you’ve to edit the theme:

  1. Select the TabContainer and search the property inspector for “Theme”
  2. Choose “Create New Theme” and a new window at the bottom will open
  3. In that window, choose Edit Theme > Add Class Items > TabContainer
  4. Back in the inspector, unfold Tab Container > Styles
  5. Choose New StyleBoxFlat for “Tab Bg”
  6. Now change Border Width > Left / Right, e.g. to 100
  7. Then set Border > Color to fully transparent (i.e. the A(lpha)-value to 0)
  8. For more inner space, change Expand Margin > Left / Right
  9. Repeat steps 5-8 with “Tab Disabled” and “Tab Fg”

What if you want a border though? I’m creating tabs that have a gray border around them, and this answer gets rid of the borders entirely.

AutumnRivers | 2021-12-13 02:49

Did you end up solving this problem? I’m facing this now and don’t know how to solve it.

Knower | 2023-02-22 01:01