如何使用poo和tkinter处理子窗口?

pgvzfuti  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(199)

我用的是便便和汗水;在每节课上我都会创造一个新的窗口。每次我调用一个类时,都应该创建一个新窗口。问题是,当我运行程序时,主窗口与次窗口重叠,导致次窗口(classa或classb)无法完成我放置的进程,因为每个进程都有自己的方法。拜托,我需要帮助。

class claseA:
        def __init__(self):
        self.ventanai=tk.Tk()
        #self.ventanai = window
        self.ventanai.title('A')

  class claseB:
        def __init__(self):
        self.ventanai=tk.Tk()
        #self.ventanai = window
        self.ventanai.title('B')

if __name__ == '__main__':
         boton = tk.Button(ventana, image=imglogo, text="Imagen: jpg, png", compound="top",command=claseA)
    boton.place(x=50,y=60)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题