Posts

Showing posts from March 17, 2019

Widgets not showing up in Tkinter GUI

Image
0 I created code in order to display a 3x3 grid of buttons for a Tic-Tac-Toe program i'm developing. The grid worked before but when i tried to put the code into a class i just get a blank screen when i try to run the program. This is my code: from tkinter import * buttons = {".!frame.!button": 0, ".!frame.!button2": 1, ".!frame.!button3": 2, ".!frame.!button4": 3, ".!frame.!button5": 4, ".!frame.!button6": 5, ".!frame.!button7": 6, ".!frame.!button8": 7, ".!frame.!button9": 8, } class GameBoard: def __init__(self, master): self.field = Frame(master) self.field.grid self.b1 = Button(...