I’m making a virtual assistant and I’m designing the interface for it. In line number 219-220 I want the input command to be replaced by a button in Tkinter but it fails when I log in, the virtual assistant greets me and doesn’t show up on the interface screen and keeps saying "you:" "Jarvis:". I ..
I’m not creating another Tk instance. The code I provided here is the entire program except the import statements. I have this function: def addCanvas(path, canvasWidth, canvasHeight): print(path) root = Tk() c = Canvas(root, width=canvasWidth, height=canvasHeight) c.pack() # img = ImageTk.PhotoImage(Image.open(r"imagepathimagename.extension")) img = ImageTk.PhotoImage(Image.open(path)) c.create_image(0, 0, image=img, anchor=NW) return img I call it this way: ..
I am writing a UI for a simulation program which accepts tabular data. The basic functionality I need is for the user to be able to enter / change data in cells either by directly typing into them, or by pasting data (usually from an excel sheet). The program checks this data and either accepts ..
I am trying to make a lookup table for image which I load to my program, but I have a problem. This is what I have been trying, but doesn’t work as expected: x1 = [i for i in range(32)] x2 = [i for i in range(32, 64)] x3 = [i for i in range(64, ..
So, I have this code, main.py: from tkinter import Tk from tkinter import Frame class MainWindow(): def __init__(self, master): self.master = master sw = self.master.winfo_screenwidth() sh = self.master.winfo_screenheight() w = 900 h = 600 x = (sw/2) – (w/2) y = (sh/2) – (h/2) self.master.geometry(‘%dx%d+%d+%d’ % (w, h, x, y)) self.master.resizable(False, False) #this part self.titleFrame ..
I have created a simple application where you can enter a word and press a button, and each time you press the button, an image and 2 labels are packed onto the screen, 1 label containing the words you have typed. I want to make it so that if you close the application and reopen ..
I cannot remember how to install tkinter modules. I remember doing it before for Tkinter calendar but it took me a long time to figure out and now I have forgotten. I cannot just type pip install ttkthemes because it says ‘pip’ is not recognized as an internal or external command, operable program or batch ..
I’m currently working on a large tkinter GUI project and it’s starting to get really overwhelming! I’ve got tons of code that looks identical but with small differences and it’s getting hard to stay organized an efficient when trying to add new things and fix old things. So I’ve got a few questions about how ..
I am trying to make a calculator with Tkinter GUI. However, when I make buttons under an entry, they get pushed apart. Also, instead of the buttons being in their corresponding columns, they are way out of line. What is making this happen? Code: from tkinter import * # Configure the window gui = Tk() ..
I have been trying to create a timer in tkinter (no updating text or anything, just perform a function after a certain amount of time) but when I run the init_timer function, it freezes. I cannot figure out why, and am in a hurry as this is a school project. Could you please tell my ..