0

I have built a small app with Tkinter and I only have one thing left, it's to switch between the windows of this app knowing that each window is programmed on its specific script, for example: root_window.py, second_window.py ... so I didn't know how to switch between them, like when I click on a button, it takes me to its own window. one more thing: I programmed my app and wrote its code in a functional programming way(not in an object-oriented way)

here is what i tried (just a small example) :

def openWindow():
    F = Frame(ear_pictures_window) # ear_pictures_window is the name of the second window script 
    F.tkraise()``` 

root_button1 = Button(root_frame, text="Choose an ear picture", font=(
    "Helvetica", 22), bg="#D175BF", fg="#5E2268", command=openWindow)

thanks in advance :)

  • 1
    You haven't shared enough of your code for anyone to be able to help you. Are your different windows all executed seperately or is there one program with includes/calls the other files to open their windows. You should share a simple, executable example to demonstrate what you are doing currently and what your problem is – scotty3785 Sep 17 '20 at 09:47
  • this answer might be of use https://stackoverflow.com/a/7557028/12148778 – RamWill Sep 20 '20 at 15:44

0 Answers0