I got another little question… I want to make multiple variables which I create with ‘setattr’ That works quite fine. It creates these variables: self.sectionButton_1 = Button(text=x) self.sectionButton_2 = Button(text=x) self.sectionButton_3 = Button(text=x) Now I want them to get displayed on the window with tkinter so that this should happen: self.sectionButton_1.grid(row=i, column=0) self.sectionButton_2.grid(row=i, column=0) and ..
I was wondering if I could get some help. I’m trying to create a reminders app where tasks can be inputted alongside both a date and time. This I have then stored in a JSON file. That being said, now I’m having some trouble creating a delete button that can delete the selected task in ..
Is it possible to specify size of a frame in a tkinter window. What i am trying to do is I have two Frames inside a MAIN frame and I need them to take the available space in 7:3 Ratio. I failed to find solution to my problem. My expected result is this. Which layout ..
I’m trying to make a tkinter script that will print a lot of buttons with functions like this. from tkinter import * def printbutton(x:int): print(x) root = Tk() root.geometry(‘500×500’) for x in range(1,100): Button(root, text = str(x), command = lambda:printbutton(x)).pack(side="left") root.mainloop() But it print all button in a line and expanded outside of my GUI. ..
I am trying to use hyperlinks in tkinter. I found this Stack Overflow question , but this would make every part of the text a link. I want to create something like this (on the window): This is Google:Google. I am using insert for the text, so I tried text_area.insert(‘end’, ‘Google’, ‘n’).bind("<Button-1>", lambda e: google()). ..
i built a small gui program with tkinter. How can i import this file into my main program without spawning the gui on start of my main.py file? I only want to spawn to gui, if i choose to in my main program. Source: Python-3x..
I’m making a python Tkinter GUI. I’m trying to make a way to create unlimited ‘task tabs’. This means unlimited frames. Each ‘tab’ (frame) has the same entry box in it. Is there a way to retrieve data from a specific frame? I understand using .get() works, but how can I .get() from a specific ..
I’m trying to make a button where it will start a program. So first, a button called ‘Run’ will appear, subsequently after 3 seconds it should come up with a new button that says ‘Stop’. The reason I want it that way. That it’s because I have tried and add two buttons on an interface ..
I would like to have conditional formatting in tkinter. The program should color by yellow only values if previous column value is different, like the photo. import tkinter import csv root = tkinter.Tk() # open file with open("dati/esempio.csv", newline = "") as file: reader = csv.reader(file) # r and c tell us where to grid ..
import tkinter as tk from tkinter import ttk root = tk.Tk() root.title("Tic Tac Toe") root.geometry("505×500") root.resizable(0,0) Blank = tk.PhotoImage(file=’Blank.png’) X = tk.PhotoImage(file=’X.png’) O = tk.PhotoImage(file=’O.png’) def configB(event): print(‘hello’) btn1 = tk.Button(root,image=Blank) btn1.place(x=0,y=0) btn2 = ttk.Button(image=Blank) btn2.place(x=165,y=0) btn3 = ttk.Button(image=Blank) btn3.place(x=330,y=0) btn4 = ttk.Button(image=Blank) btn4.place(x=0,y=165) btn5 = ttk.Button(image=Blank) btn5.place(x=165,y=165) btn6 = ttk.Button(image=Blank) btn6.place(x=330,y=165) btn7 = ttk.Button(image=Blank) ..