Python Forum
Buttons not appearing, first time button making
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Buttons not appearing, first time button making
#2
the indentation is wrong

try

from tkinter import *
 
class Window (Frame) :
 
    def __init__(self, master = None) :
        Frame.__init__(self, master)
        self.master = master
        self.init_window()
 
    def init_window(self) :
        self.master.title("GUI")
        self.pack(fill=BOTH, expand=1)
        quitButton = Button(self, text="Quit")
        quitButton.place(x=0, y=0)
 
root = Tk()
root.geometry("400x300")
app = Window(root)
root.mainloop()
Reply


Messages In This Thread
RE: Buttons not appearing, first time button making - by Axel_Erfurt - Dec-30-2018, 10:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Tkinter: An image and label are not appearing. emont 7 1,157 Mar-21-2024, 03:00 PM
Last Post: deanhystad
  My Background Image Is Not Appearing (Python Tkinter) HailyMary 2 4,988 Mar-14-2023, 06:13 PM
Last Post: deanhystad
  Figure Gets Larger Every time I click a show button joshuagreineder 2 1,423 Aug-11-2022, 06:25 AM
Last Post: chinky
  [Tkinter] Scrollable buttons with an add/delete button Clich3 5 3,662 Jun-16-2022, 07:19 PM
Last Post: rob101
  [Tkinter] Command button, then more command buttons Heyjoe 4 3,022 Aug-08-2020, 11:28 AM
Last Post: Yoriz
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 5,138 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp
  Tkinter widgets not appearing (3.x) RSAngryfiend 1 9,403 Jul-05-2017, 09:13 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020