Questions tagged [tkinter-layout]
378 questions
1
vote
2 answers
Deleting all Labels from grid square in tkinter without knowing Labels in first place
So i would like something along the lines of what this code looks like it should do but 'grid()' isn't defined:
for label in grid(column = 1, row = 2):
label.forget()

dan Man771
- 41
- 8
1
vote
1 answer
How to create a software loading window with TKinter?
With Tkinter how can i create a small software loading window? A window whose hard loading for example 7 seconds and then automatically open the software, for example the home.py file.
How can I open another window automatically after 7 seconds? …
user17503353
1
vote
0 answers
tkinter items not being placed inside frame
I'm having an issue where nothing is being placed in the frame and I'm not sure why as the template works when I tested that and can't see where I have done anything different other than use different widgets
Template used:…

Will Jordan
- 245
- 2
- 12
1
vote
1 answer
how do I properly align my tkinter buttons with spaces
I want it to look like this:
so I did this:
seats = ['F11', 'F12', 'F13', 'F14', 'F21', 'F22', 'F23', 'F24', 'B31', 'B32', 'B33', 'B34',
'B41', 'B42', 'B43', 'B44', 'B51', 'B52', 'B53', 'B54', 'E61', 'E62', 'E63', 'E64',
'E71', 'E72',…

abi
- 50
- 4
1
vote
0 answers
How can i destroy my main loop and create a new one from another window in tkinter
I Have a signin form and after signing in I created a tray and hide signing form ...how can I destroy my old master and create a new one from tray.py?
for eg:- i have a file main.py in which I am showing form like -
import tkinter as tk
from signin…

Intellial solutions
- 23
- 5
1
vote
1 answer
How can we create a new layout by defining new elements in tkinter ttk widgets
I want to create/modify new elements and define a new layout in tkinter ttk syle but I not sure how to configure that style in a widget.
import tkinter as tk
from tkinter import ttk
def _initialize_style():
style =…

Manish kumar MoNi
- 17
- 5
1
vote
0 answers
tkinter using default Mac theme
i am working on a tkinter app and I just updated to the latest version of python(python 3.9.5) and tkinter is using my mac's default theme, which doesn't go with my design.
i want this(the light theme):
but what am getting is(the dark theme):
is…
user14041846
1
vote
1 answer
How can start project with another pyton project in tkinter?
I am new at tkinter.I have a real time emotion detection project.i called from another .py file, all of them is inside same file.Video capture part is defined cap in test.py, i call cap method and add the button.But when i run the project video…

Doğukan CEBECİ
- 300
- 1
- 3
- 13
1
vote
1 answer
Tkinter grid: Use new column on current row for new widget
I program a GUI in Python3 with Tkinter and place widgets with .grid(). How can i tell Tkinter to place a new widget on the same row as the last placed widget but on a new, specified, column. The problem is that Tkinter automatically uses the next…

12431234123412341234123
- 2,732
- 15
- 22
1
vote
1 answer
Cannot set a background color for my tkinter application?
When I try to set a background color for my main Frame, that has all widgets as childs, it only change the very bottom of the background. If I set a background for all Frame widgets, it still does not color some empty space. How can I set a…

atrefeu
- 178
- 11
1
vote
3 answers
Tkinter can't open image
for some reason, Tkinter can't open my image. If I don't add from tkinter import * it shows error message as:
Error Message without from tkinter import *:
C:\Users\NG>python e:/PythonTkinter/app.py
Traceback (most recent call last):
File…

Shrez Ean
- 19
- 3
1
vote
1 answer
Tkinter Texboxes Becoming Transparent On A Button Click
from tkinter import Tk, scrolledtext, INSERT, Button, PhotoImage, Label, Text
root = Tk()
root.geometry('1000x550')
bg = PhotoImage(file='./assets/bg.png')
root.resizable(False, False)
root.title('Testing Classes')
window = Label(root,…

Hunter
- 188
- 2
- 11
1
vote
1 answer
How can I prevent Tkinter slave widgets from dictating their own positions?
So I have two frames, a centered text frame and a toolbar with buttons in it. I want the toolbar to be on top side, so I tried self.toolbar.pack(side='top', pady=60) but it doesn't seem to be enough.
What happens is that the buttons, who are slaves…

atrefeu
- 178
- 11
1
vote
1 answer
Adding a horizontal scrollbar in Tkinter with the help of canvas
I am trying to add a horizontal & vertical scrollbar in Tkinter. The vertical scrollbar works but the horizontal scrollbar does not work and I don't know why. Actually, the horizontal scrollbar appears on the window but not scrollable. I would be…

Kahraman
- 33
- 8
1
vote
1 answer
In Tkinter, How does padx differ when used as argument within a widget and an argument in the grid function?
from tkinter import *
window = Tk()
x = Button(text="a", padx=20)
y = Button(text="aaaaa", padx=20)
x.grid(padx=20)
y.grid(padx=20)
window.mainloop()
Despite having the same padding values, x and y buttons have the same size and are displayed…

Kun.tito
- 165
- 1
- 7