Align tabs from right to left using ttk.Notebook widget

前端 未结 2 1010
闹比i
闹比i 2021-01-04 15:28

I want to align tabs (panes) inside a ttk.Notebook widget from right to left (the default is from left to right). How might this be done?

Below is my current code:

2条回答
  •  遥遥无期
    2021-01-04 16:03

    In Oblivion's line:

    s.configure('TNotebook', tabposition='ne')
    

    the 'ne' bit can be:

    nw => above (north) and toe the left (west)
    ne => above and to the right (east)
    en => to the right (east), at the top
    es => to the right (east), at the bottom
    se => below (south) and to the right (east)
    sw => below (south) and to the left (west)
    ws => to the left (west) and to the bottom (south)
    wn => to the left (west) and at top
    

    'nw' is, I guess, the more common one, but an application may require it otherwise.

提交回复
热议问题