Notebook widget - a container widget which contains multiple panes, but displays one pane at a time.
Use bind to call a function on following event:
<<NotebookTabChanged>>