Skip to content
Advertisement

Tag: tkinter

How do I fill empty space using grid system in tkinter?

I have 5 buttons with 3 of them in the first row and 2 in the second row. How do I fill the white space that is left? I tried the following: Thanks in advance. Answer There are multiple ways to do this. One of the easier ones is to play around with the Grid Layout. Try this:

Record Video Button in tkinter GUI python

I’m pretty new to python and espcially tkinter and opencv. I’ve got someway (a little way) to creating a gui that will eventually control a microscope and ai. But I’ve hit a stumbling block, trying to record the video that is displayed within the gui, I think its to do with the video feed already been captured in the display,

Tk Filedialog giving back a tuple

I am trying to take a file and put it into all directories 1 level down. I thought that this would be simple, what am I doing wrong? Answer Since it is “askopenfilenames”, it returns the results in the form of a tuple. You can iterate over it and move the files to the directory selected:

Replacing a window with a new one- Python tkinter

I’m creating a quiz game in Pythonn tkinter. I’m using my original window, called window in the beginning of the program. Then, if the user clicks on the START button, window gets replaced with window2 and the buttons that get created in the App class are displayed on window2. When I do that, it throws the following error: My code:

Advertisement