I have a Ttk Notebook widget containing 8 Frames - so, 8 tabs. Each frame contains a Text widget. I have a button outside the Notebook widget, and I want to insert text into the
You can retrieve the selected tab through select
method. However, this method returns a tab_id which is not much useful as is. index
convert it to the number of the selected tab.
>>> nb.select()
'.4299842480.4300630784'
>>> nb.index(nb.select())
2
Note that you coud also get more information about the selected tab using tab
>>> nb.tab(nb.select(), "text")
'mytab2'
You might look at Notebook reference documentation : http://docs.python.org/3/library/tkinter.ttk.html#notebook