📜  python tkinter 在按钮单击时转到另一个窗口 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:37.379000             🧑  作者: Mango

代码示例1
# Function to make new window
def openNewWindow():
  newWindow = Toplevel(root)
  newWindow.title("New page")
  newWindow.geometry("700x400")

button = Button(root, text="Click me", command=openNewWindow)
button.pack()