Let's see how to perform this recipe:
- To use multiple notebooks within the same GUI, we start by creating two frames. The first frame will hold the notebooks and their tabs while the second frame will serve as the display area for the widgets each tab is designed to display.
- Create a new module: GUI_Complexity_end_tab3_multiple_notebooks.py.
- Add the following code:
import tkinter as tkfrom tkinter import ttkfrom tkinter import scrolledtextfrom tkinter import Menufrom tkinter import Spinboxfrom tkinter.messagebox import showinfo
- Create callback functions:
def clickMe(button, name, number): button.configure(text='Hello {} {}'.format(name.get(), number.get()))def clearScrol(scr): scr.delete('1.0', tk.END) def _spin(spin, ...