I am trying to make a pound to kilogram converter and basically this gives me the error: Answer The function is being called directly when the code is being executed initially, when the entry box is empty, there is nothing inside of it, so you have to remove that and just call the function from the buttons, and also add
Tag: tkinter
Can someone explain me how this programm with tkinter works? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question Code: Can someone explain how these loops work in this code? Would be very grateful, I’m a little confused right
How to make a shape a button in Tkinter
Is there a way to make a shape a button in a tkinter canvas? Or, to put it simply, is there a way to figure out if the user clicked the rectangle drawn above? Answer I don’t know how to see if someone clicks the rectangle but you could have the color change if a cursor hovers over it… I’m
Can I call a function by clicking ‘OK’ in messagebox.showinfo?
I have added a message box in my code and I want to call a function defined earlier when clicking the ‘OK’ button in the message box. Is there any way to achieve this? Thanks in advance. Answer When you make a showinfo box, it actually halts your script until you press OK. All you will need to do is
$DISPLAY environment problem with Tkinter in VScode
I’m trying to build a simple countdown timer using tkinter, however when I run the code the following message appears: I searched a lot for answers but did not understood most of them. How can I solve this problem and get tkinter to work on VScode? Thanks in advance! Edit 1: Answer I had the same problem on Ubuntu 20.04.1
How can I convert a .py to .exe using pmw? [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question I’m building a GUI program in Python 3.8 and I want to convert
How to add a console to a tkinter window
I want a way to add a console to a tkinter window or redirect the output of the eval or exec functions to the maybe a uneditable text widget in tkinter. Also I want it so the code does not have to be saved first to get executed, I want it to be executed nevertheless. I have already viewed a
How to calculate total column using python
I am creating an inventory system in Python. Treeview table total column need to calculate and display sum using python. I need to calculate final total of total column. I tried but I could the result what I tried so far I attached below. I got an error sum1 += tot TypeError: unsupported operand type(s) for +=: ‘float’ and ‘tuple’
Why isn’t the program closing after the fade animation?
I am new to python and I came up with this idea on how to make the page fade out by controlling the wm_attributes of my GUI program. I made this code which decreases the amount of ‘a’ by 0.1 each iteration then the program goes to sleep for 0.1 second to create this fade effect. After the page was
How can I use a variable in website link using Python?
I want to send WhatsApp messages to numbers without adding them contact using Python. webbrowser.open(‘https://api.WhatsApp.com/send?phone=number’) I used upper code in my program but Ii want to ask that, I am making a TkInter project, in my program cph is phone number variable and I also called cph.get() function but how can I use this cph variable in this link. Answer