Here is an example:

I need to know which tab is active whenever a user hits "Ok" button. Tk NoteBook widget should have select method which returns currently active tab but I could only find selectTab which just selects the tab. How can I know which tab is currently active?