I have a problem with my Python code with tkitner. I created a window that has a resolution of 600 x 400, but when I start the project the window remains with the standard resolution (the one that widens only if you add objects). This is my code:
import tkinter as tk
import random
schermata = tk.Tk()
schermata.geometry = ('600x400')
schermata.title('8 Ball Game!')
input_testo = tk.StringVar()
entrata = tk.Entry(schermata, textvariable = input_testo, width = 30, borderwidth = 5)
entrata.grid(row = 0, column = 10 )
parole = ['Secondo me si', 'Credo di si', 'Per niente', 'Non dire cavolate', 'Stai scherzando vero?', 'Ma che razza di domande sono', '...', 'Certo', 'Stai zitto']
def risposte():
global parole
input_testo.set(random.choice(parole))
bottone = tk.Button(text = 'Gioca!', command=lambda:risposte())
bottone.grid(row = 2, column = 5)
if __name__ == '__main__':
schermata.mainloop()
Things I tried to fix: I wrote ('600 x 400'), (600, 400) and (600x400). I also tried to rewrite all the code by hand and saw that this happened after writing the entry. Can anyone help me?