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")
Larz60+ write Jan-31-2021, 01:54 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.