Jul-19-2020, 06:58 PM
This is the entire code except for the function, using the changes you suggested.
I don't understand why the code runs the function because this is not supposed to happen until after mybutton is clicked.
from tkinter import * root = Tk() root.geometry("700x700") import om mybutton = Button(root, text="Click me for opening menu.", bg="white", fg="firebrick", \ relief = "groove", font = "Helvitica 60",command = om.openingmenu) mybutton.pack()The code does not create the mybutton. The code runs the function. This produces a menu.
I don't understand why the code runs the function because this is not supposed to happen until after mybutton is clicked.