I want to create a window which doesn’t allow the user to access other windows until you give an input. I tried win.attribute(“ontop”, True) but it allows the user to access other windows. or is there any function like a force_focus_lock() in Tkinter python 3.8 which doesn’t allow other window to get focus until you give a input or the
Tag: tkinter
How do I change the volume in realtime for my music player (pygame)
I am trying to change the volume of my music in realtime for my music player. My code: And here are the action events: But I don’t know how to change the volume while the music is playing, it only changes the volume after I restart the song. I tried: But that didn’t work it just game me an error.
tkinter – dock and undock frame with wm_manage and wm_forget
I found the following in the tk docs: The wm manage and wm forget commands may be used to perform undocking and docking of windows. So I tried wm_manage and wm_forget in this code: But it dosen’t worked out. So I readed more and there is no way I can missunderstand this: A toplevel widget may be used as a
Buttons in a for loop to update labels in a for loop?
Trying to get individual buttons to update individual labels in tkinter. Here’s my code: When you run the code there are three buttons in a column next to three labels in the next column over. What I’m trying to do is get it so that each button changes the label next to it. What happens when I run the code
Need help for running tkinter program
I am new to GUI programming so I don’t know why this is not working when I run this program it doesn’t open tkinter window so help me out,this is only running speech recognition program Answer Simply add root.mainloop() at the very end of the script. This is one of the must-haves when you make a script using Tkinter.
I can’t scroll grids in frames in canvas (tkinter)
I am using Tkinter for a project, and I found in Stackoverflow a code to create a scrollbar, which I understood well. I wanted to scroll some buttons, which worked, but now when I try to scroll some grids (button and scales), it doesn’t work. I have tried to manage my code with answers here and here, but I didn’t
Tkinter: keep update a variable
I really need help, my brain is melting because of this problem. I’ve studied python for 2 months maybe and I’m not very expert in programming. I’ve got an issue… I’m using tkinter on this program; in this small GUI I’d like to always keep updated the global variable “temp”, and its value should change everytime I click on the
Using Tkinter, Threading and After method
im working on a selenium project using tkinter in python. I want to execute many selenium task at one time(could be up to 100), so I used threading to accomplish this goal, but I came to a problem, due to the fact that I need all individual selenium task to wait a couple seconds between instructions, I used the ‘.after’
can’t invoke “wm” command: application has been destroyed
Please understand even if the source code is dirty. What I want is for the image to follow the mouse I tried to follow the mouse by repeating the image disappearing and appearing, but it is not easy. Answer Here. I made the image follow the mouse, without pyautogui. Code:
How to go back to previous frame after button click using Tkinter on Python?
I want to have a GUI with 2 buttons. Once clicked on either button, I want to see a new GUI which has a button to go back to the main GUI with the two buttons again. This is what I’ve got right now but the ‘Go back’ button doesn’t do anything. How can I go back to my first