Jan-30-2021, 11:14 PM
Hello,
I dont have idea, how i can change a function geometry which is in class.
My code.
I dont have idea, how i can change a function geometry which is in class.
My code.
class MyFirstGUI(tk.Toplevel): def __init__(self, master): self.master = master self.master.geometry("500x500") self.label=Label(master,text="This is first text").pack() self.przycisk = Button(master,text="This is button", command=self.menu).pack() self.przycisk = Button(master,text="Magic",fg="red", command=self.trinker).pack() #self.przycisk = Button(master,text="Chat", command=self.trinker2).pack() self.przycisk1 = Button(master,text="Exit", command=master.destroy).pack() def menu(self): tk.Toplevel() print("Greetings") def trinker(self): tk.Toplevel() print("222") def blad(self): information = messagebox.askquestion("WARNING!!", "DO YOU WANT LEAVE?") if information == 'yes': root.destroy() else: messagebox.showinfo("WE\'RE HAPPY", "THANKS! THAT YOU STAYING HERE")