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
#3
Your code, cleaned up, so it actually works (find another tutorial that doesn't include the unnecessary crap, and explains things, like http://effbot.org/tkinterbook/button.htm or one of these https://wiki.python.org/moin/TkInter ). Note that the button doesn't do anything because there is no "command=" provided.
from tkinter import *

class Window() :
     def __init__(self, master = None) :
        self.master = master
        self.init_window()

     def init_window(self):
        self.master.title("GUI")
        quitButton = Button(self.master, text="Quit", bg="red")
        quitButton.grid()

root = Tk()
root.geometry("400x300")
app = Window(root)
root.mainloop() 
Reply


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

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