How to change ttk widget layout when state changes?

时间:2018-04-20 21:24:56

标签: tkinter tk ttk

Python source includes a ttk demo which adds close buttons to ttk.Notebook tabs. It uses style element create and style layout to position an image to the tab.

With style map I can specify different properties for a widget depending on its state. Can I somehow also change the layout dynamically so that the close button is shown only on active tab?

(I know I can specify different images for the element depending on the state of the element itself, but I'd like to take into account the state of the container of the element.)

0 个答案:

没有答案