I dont know what I done wrong, but the error is : error 1064 (42000) : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘%s’ I made this code above in my code : This code is working. So idk why this code
Tag: tkinter
Takes 1 positional argument but 2 were given Python Tkinter
I am working on one feature of my software which takes keyboard which I have bind to the window like this win.bind(‘<Key>’, self.triggerBackButton). And here is the callback funtion. Logic of above function goes something like this. It takes self and event as input, where event holds the information like from where it was triggered, which button triggered it etc.
How to insert scrollbar into canvas filled with buttons?
I’m trying to insert a scrollbar into a canvas filled with buttons (where, buttons can be switched to clickable text as well). With the code below, the window seems OK. However, when I uncomment the lines with the scrollbar, the window geometry scrambles. Can anybody give a hand to figure out what’s wrong with the code? System: Windows 10, python
How to change color of matplotlib toolbar in tkinter?
I would like to change the color of the toolbar when making a matplotlib figure in tkinter. I have managed to find and change the color of two parts. There is one remaining. My code comes directly from https://matplotlib.org/stable/gallery/user_interfaces/embedding_in_tk_sgskip.html?highlight=embedding%20tk with three additional lines to change colors. This gives me the window: What is the small, grey rectangle I have pointed
Tkinter: How to swich label text using buttons
I want to change the label text to the buttonĀ“s name when I press it. there are undefined buttons so I can’t save each one to a variable. Answer You have many errors. Here is a version of your code, for Python 3, not Python 2, that at least runs. It may not do exactly what you want it to
(Python) Is there a way to clear all entry boxes in a Tkinter UI in one line?
I have made a Tkinter UI for a fairly simple calculator that all works fine, and I have a clear button to clear all entry boxes. I’d rather have one line of code to clear all 40+ boxes than 40+ lines to clear each individually, and was wondering if there was a Tkinter command that could do the same as
A tkinter GUI with a resizable left panel: resizable arrow indicator appearance issue
I created this test code to simulate a Tk window with a left panel that is resizable. How it works: When the mouse pointer move over the ttk.Separator, a resizable arrow indicator will appear where the mouse pointer is. Pressing the left mouse button and moving the mouse pointer, the width of the left panel will resize corresponding to the
How to get the coordinate of a checkbox created by tkinter package on a screen
I created a graphical user interface that has 3 checkboxes by using the Checkbox class given in tkinter package. I want to retrieve the screen coordinate of each checkbox. I have been trying to use pyautogui.position() to retrieve the coordianates. However, those values seem wrong because when I used those coordinates for the pyautogui engine to click on the box,
If Statement depending on the contents of a .txt file – Python 3.9
Whenever I run the program, I don’t get an error message. However, when I type in what I have just set or set before as the password (in the txt file) or what is printed in the terminal, it sleeps the program like I got it wrong. I’ve posted this before and it was too long, so it’s shortened now.
Trying to resize image on 2nd window of Tkinter GUI
This code will open a main window with an image, then another window with the same image. Is there any way to resize the image to be smaller? (go to # !>>> IMAGE 2 (2nd window)) Here is the code: Answer I see Bryan Oakley has already posted an answer your question, but I’ll supplement it with my own, which