I’m making a GUI application and I want to use matplotlib to display some plots. I have structured my code like that: The problem I have is that when the toplevel window is displayed and then closed, the program won’t close correctly even after closing the root window. Is there a way to fix this?? Answer As Henry Yik pointed
Tag: tkinter
How can I condition a button click not to execute, if the click is not immediately released in Python?
What I want the button not to do is that the linked function is executed if the user holds the click and when he releases it the function does not execute, because I have an event linked to the button bind to move the window as it doesn’t have the window manager and the app is mostly just buttons. Thank
Matplotlib FuncAnimation Created twice – duplicate when embbeded in tkinter
I have a troubleing bug that i just could not understands it’s origin. Several days of attempts and still no luck. I’m trying to create a line cursor that correspond to played audio with FuncAnimation and for some reason, the animation is created twice ONLY when the callback (line_select_callback) that activates the function is triggered from RectangleSelector widget after drawing
How can I pass the TKinter button/label that triggered a bind to a function which that bind calls?
I hope someone can help with this. I’m new to coding and wanted to try doing some GUI stuff in Python with TKinter. In one of my projects, I want any button that the mouse hovers over to change it’s background color. However I don’t want to define a function for every single button. Here is an example: Now of
TKinter – buttons not in a row?
i try to bring those 2 buttons i a line under the dropboxes – But as you can see in the picture – the button are not in the same line. This is part of my code where i am setting the grid for the output: Any ideas why this is not working as expected? Answer In order to match
How to set a maximum limit for dragging in tkinter PanedWindow?
In the above code, I don’t want the frame1 to expand too much when dragged. How can I set a limit for this? Answer There are no straightforward ways to do this. You can achieve this either by setting minsize for frame2. Something like this: Another way is to return “break” when the sash position is greater than the max-width
Why does it say “TypeError: ‘Label’ object is not callable”?
I am making a digital clock python program and don’t know why it says “TypeError: ‘Label’ object is not callable” for line: I watched a yt video, that’s where I got the code. The guy there didn’t have a problem, but I do. I checked the answer of someone else in stack overflow, they said to not name our variable
Tkinter Python – how to set a command for a column
I want to create a table like this: I want it to work such that when I click on “delete this record” it will delete that row of data. I am trying this code: Answer You can bind <ButtonRelease-1> on the treeview and then determine whether user has clicked on the required cells. If yes, ask for confirmation and delete
How do i make the print to appear in tkinter window?
So i made this program for fun but i saw that when i click the button the “ez” text appears in pycharm and i wanted to make it appear in the window of the program. Does anyone know how i can do that? Answer Just set the new text to the label you already have:
Remove minimizd button in tkinter “root” window
I am trying to apply transient to Tk() instance. Example: This code will remove the ▭ and – buttons. But, it will only do it for tk.Toplevel(): The window on the left in the root window and the one on the right is tk.Toplevel() But is there any way to remove the ▭ and – buttons on the root window?