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.)