As the title says, I was wondering if it's possible to change the width of a notebook widget tab?
What I'm trying to do is to make sure that the tabs are of equal size and fill the entire width of the window even when someone resizes it. Currently, it appears like so:
But would like to have it like so:
[I did this one by adding spaces before and after the tab name]
The relevant piece of code for the first one is:
ttk::frame $fr.note.tab1
$fr.note add $fr.note.tab1 -text "Tab1" ;# For the second, it's " Tab1 "
ttk::frame $fr.note.tab2
$fr.note add $fr.note.tab2 -text "Tab2"
ttk::frame $fr.note.tab3
$fr.note add $fr.note.tab3 -text "Tab3"
I tried to look in the manual but it seems that only the widget itself can have its size altered (the area below the tab).
Is there perhaps a way to specify the width of the tab, or a workaround? I tried:
$fr.note add $fr.note.tab1 -text "Tab1" -width 90
But of course, this threw an error saying that the option -width
was an unknown option (and tab doesn't appear to be configurable with no configure
command).