Part I : https://youtu.be/TQg3xQJtp0o
We have already seen how to create and manage Menu in tkinter GUI. We can also use sub menus to focus on specific sub process of the main process.
To create a sub menu from the main menu we will create one instant of menu class
menu_sub=tk.Menu(menu_file,tearoff=0,bg='green')
This menu we will declare as sub menu of one menu ( here it is file menu )
menu_file.add_cascade(label='Sub 1',menu=menu_sub )
Here we have specified the label to be shown while displaying the sub menu.
We can add items to our sub menu and display the same. menu_sub.add_command(label='Sub 11',command=my_fun()) menu_sub.add_command(label='Sub 12',command=my_fun())
We can also open one child window when any item is clicked in the menu. For this we will use Toplevel
https://www.plus2net.com/python/tkinter-menu.php
#tkintersubmenu #SubMenu #GUIsubmenu #plus2net #python #GUI #tkinter #childwindow