Nov-24-2020, 10:37 PM
I removed everything not needed to draw a new window for entering info to carpet a room.
You cannot use input to get info from this window or print to write to this window. You will have to create tk controls to do that stuff.
You cannot use input to get info from this window or print to write to this window. You will have to create tk controls to do that stuff.
from tkinter import * master = Tk() master.title("Carpet shop") def carpetRooms(): newWindow = Toplevel(master) newWindow.geometry("350x350") newWindow.title("Carpet (rooms)") # Add code here to create Entries and labels and buttons # to enter the info needed to carpet a room. Button(master, text="Carpet (rooms)", command = carpetRooms).grid(row=1,column=3) master.mainloop()You should avoid using pop-up windows when possible. Take a look at the tk notebook control which is a tabbed interface with multiple pages. You could replace your buttons with tabs, and the notebook pages take the place of your pop-up windows. This is the "approved" best way to make a GUI application with multiple views. I think the main reason for this is you can jump between views easily, maybe for reference or maybe cutting and pasting. This is tough to do if you have a pop-up view that goes away when another view is selected. And if you allow multiple pop-ups at the same time the screen gets cluttered.