Tkinter Notebook methods to select hide forget tabs and using notebook tab change event
We can display the tab number at the footer of the window. Once the tab is changed then we can bind the event to trigger a function to read the tab_id by select() method and then getting the index of the tab by using index() method.
We can execute the function by using virtual event.
my_tabs.bind('<<NotebookTabChanged>>',my_msg)
Here my_msg is our function and inside this we will keep our code to read and display the tab number. Note the two methods used here, my_tabs.select() returns the tab_id of the current tab. Then same is used as input to my_tabs.index() to get the tab number as integer. The function str() is used to convert the number into string before displaying at Labell4.