Python 你能做一件事吗;类别“;在tkinter应用程序中

Python 你能做一件事吗;类别“;在tkinter应用程序中,python,python-3.x,user-interface,tkinter,Python,Python 3.x,User Interface,Tkinter,解释起来有点棘手,因为我不知道它的确切名称,但我目前正在制作一个应用程序(我是初学者),我想知道,通过点击一个按钮,它是否可以将你带到应用程序的另一个“部分”。 例如,该程序要求您在两个类别中进行选择,如电影或节目,单击其中一个类别,它会将您带到应用程序的另一个部分,其中可能会询问您,例如,您希望观看什么类型的电影等,并最终显示您选择的类别中的多部电影 这个例子与我的应用程序无关,但它是为了让我想做的更清楚 from tkinter import * root = Tk() def fun1

解释起来有点棘手,因为我不知道它的确切名称,但我目前正在制作一个应用程序(我是初学者),我想知道,通过点击一个按钮,它是否可以将你带到应用程序的另一个“部分”。 例如,该程序要求您在两个类别中进行选择,如电影或节目,单击其中一个类别,它会将您带到应用程序的另一个部分,其中可能会询问您,例如,您希望观看什么类型的电影等,并最终显示您选择的类别中的多部电影 这个例子与我的应用程序无关,但它是为了让我想做的更清楚

from tkinter import *

root = Tk()

def fun1():
   root.destroy()
   root2=Tk()
  #add buttons, categories here for movies

def fun2():
   root.destroy()
   root3=Tk()
  #add buttons, categories here for shows



bt1 = Button(root, text = 'movies', command=fun1)
bt2 = Button(root, text = 'shows', command=fun2)

bt1.pack()
bt2.pack()