Next, we will add menu items in every individual menu. Not surprisingly, the code for the menu items needs to be added in the respective menu instance, as shown in the following screenshot:
In our example, we will add menu items to the File, Edit, and About menus (2.02.py).
The View menu has certain menu item variations, which will be tackled in the following section and are therefore not dealt with here.
Menu items are added by using the add_command() method. The format used to add menu items is as follows:
my_menu.add_command(label="Menu Item Label", accelerator='KeyBoard Shortcut', compound='left', image=my_image, underline=0, ...