I'm trying to create a tab layout using Pyviz-Panel (example code below) in a Jupyter notebook. I'd like to keep the size of individual tab names the same.
However, tab.width
changes/sets the size of the overall window for the Tabs set.
Even tab[0].width
sets window width for the contents within tab 'A' i.e., the width of the column/button in my example below. That's not what I'm after.
How do I change the width of the name area for each tab?
import panel as pn
pn.extension()
import panel.widgets as pnw
name_list = ['A','BBB','CCCCC']
tab_contents = name_list
buttons = [pnw.Button(name="Do "+name) for name in tab_contents]
columns = [pn.layout.Column() for i in range(len(name_list))]
tab = pn.layout.Tabs()
for i in range(len(name_list)):
columns[i].extend([buttons[i]])
tab.append((name_list[i],columns[i]))
tab