I just put together this basic retirement savings calculator using python. While this works, I had a couple of questions: Is there a way to embed the plot directly, i.e. without saving it as a PNG and then loading it again? Line 30 reads img.image = render. While I understand that this updates the image attribute for the label defined
Tag: tkinter
How to wait for result from Tkinter TopLevel window before continuing?
After a user clicks on a button, I want to create a new TopLevel window with suggestions and when user selects his/her suggestion on the toplevel window and clicks the button “Done” I want to destroy the toplevel window and pass the selected result to root window. This is what I want to achieve but until now I am not
Trying to declare a lambda function inside command parameter for the button but it doesn’t work(Tkinter)
I’m trying to enter a function with parameters without calling it by using lambda but I bump into an error, do you know why? Here’s the function: All I’m trying to do is to change the accountName and accountPassword values for my code. Here’s where I’m trying to write it down: And here’s from where I retrieve the new values:
Rename the label in tkinter
I work with tkinter. I want to change the name of the labels. By entering the characters in the field and hitting the button, the labels are renamed one by one. That is, the first time I enter the character “Hello”, then that character is inserted in the label; It is then removed from the field. This time I have
deleting a label after a given time period
I am trying to delete a label after a given time period but I am getting an error which I understand here’s the code which is giving the error and heres the error how can I delete the label ?? Answer As the error said, the label has already been destroyed when update() is triggered/executed by .after(). So you should
I cannot redirect in tkinter program
My aim is to open on the same window when the button is pressed. But when I run the program, it opens in 2 windows at the same time. I want it to open when the button is pressed. How can I do it? Answer Your Problem is pretty easy. you cant do twice Tk() in your code and any
tkinter filedialog – how to get directory of selected file?
How can I get folder where is stored file selected from tkinter filedialog? I want make something such this: Answer You could use os.path.dirname for that.
Treeview heading off by one column?
I cannot for the life of me find any post or documentation that explains why the Treeview heading is off by one column from the rest of the data. Even the documentation I found shows this issue in an example but does not describe the issue. As you can see the headings are off by one column. I cannot figure
pyinstaller makes an empty black window of my tkinter gui
For a very simple example, consider the following code which produces a window like so: After running pyinstaller –onefile –noconsole minimal.py (the name of the code file is minimal.py), I obtain, in the dist folder a bundle file (the app) which, when run, gives me the following: The menu works just normally (that’s the reason for which I included it;
How to assign different permissions to users with different levels in Python?
I’m creating a simple login GUI. I’m trying to make it so that level 3 users can access all requests, level 2 users can only access database and sales related requests, and level 1 users can only access the sale requests. However, I’m stuck on trying to retrieve the level info and using it in the if- else statement. Full