Aug-22-2020, 08:06 PM
Changing the geometry to 1000x1000 did work. My next goals was to destroy the first set of buttons. I was able to do this after making a few changes (as seen in the following code) after a bit of trial and error.
import tkinter as tk myfont = "Helvitica 30" mybg = "lightskyblue" class Main: def __init__(self, root): self.root = root self.root.geometry("500x500") self.createfstframe() def createfstframe(self, bg= "green"): self.fstframe = tk.Frame(root) self.fstframe.pack(padx=100, pady=100) self.Hellobn = tk.Button(self.fstframe, text="Hello", bg=mybg, font=myfont) self.Hellobn.pack(fill=tk.BOTH, expand=1) self.Howyoubn = tk.Button(self.fstframe, text="How are you? ", bg=mybg, font=myfont) self.Howyoubn.pack(fill=tk.BOTH, expand=1) self.clickherebn = tk.Button(self.fstframe, text="Click here to start", bg="deepskyblue", font=myfont, command=self.sa) self.clickherebn.pack(fill=tk.BOTH, expand=1) self.quitbn = tk.Button(self.fstframe, text="Quit", font=myfont, bg="red", command=self.fstframe.quit) self.quitbn.pack(fill=tk.BOTH, expand=1) def sa(self): self.fstframe.destroy() mnframe = tk.Frame(root) mnframe.pack(padx=100, pady=100) self.mybn = tk.Button(mnframe, text="mybutton", font=myfont, bg="red") self.mybn.pack(fill=tk.BOTH, expand=1) print("Hello") root = tk.Tk() b = Main(root) root.mainloop()