I'm trying to create a number of frames to be accessed through the use of the menu widget. When using the menu, you can click on one of the commands - it would bring up a frame and the menu widget should still be at the top, so you can easily decide where to go.
I'm trying to make use of the option menu widget within a function which is called after a login page, therefore I'm using the top level method within it. When attempting to do this option menu I encountered a few problems and I'm currently stuck as well as not understanding what's wrong with the code, so I was hoping someone would tell me what's wrong with it.
CoreContent = function named
myGUI = main root
def CoreContent():
#Building core content/structure
myGUI.withdraw() # This is the main root that I remove after user logs in
CoreRoot = Toplevel(myGUI, bg="powderblue") # Toplevel
CoreRoot.title("titletest")
CoreRoot.geometry('300x500')
CoreRoot.resizable(width=False, height=False)
#Creating drop-down menu
menu = Menu(CoreRoot)
CoreRoot.config(menu=menu)
filemenu = Menu(menu)
menu.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="test one", command=lambda: doNothing()) # Problem
filemenu.add_command(label="soon")
filemenu.add_separator()
filemenu.add_command(label="Exit")
I'm confused how and where I should create the frames to add as a command to make use of within the option menu widget.