Questions tagged [tkinter-layout]
378 questions
-1
votes
1 answer
Is there a way to automatically change the size of a tkiner window to fit widgets?
I am designing a simple Tkinter GUI program that prints out a table according to a SQL query. However, since I'm not sure how big the query will be, I was wondering if there's a way for the tkinter window to automatically change size to fit the…
-1
votes
1 answer
How to keep a button stuck at the bottom of a tkniter window?
I am trying to create a tkinter window with a button that is stuck at the bottom. I want the button to be used to add new items to the window (separate code, not shown here), but always keep the button at the bottom. Something like the…

Math chiller
- 4,123
- 6
- 28
- 44
-1
votes
1 answer
saving tkinter entry box text to a JSON format
I am trying to store tkinter entrybox text into a JSON format:
The expected output is:
{"objects": [{"neptun_code": "BVQYMZ", "result": "89", "mark": "4"}, {"neptun_code": "NHFKYM", "result": "95", "mark": "5"}]}
My output looks like this:
[{':',…

JosephNgugiMuiruri
- 55
- 8
-1
votes
1 answer
set separate grid for two different frames
I want a window that contains two frames. The top frame includes five labels for user input. The bottom frame includes two buttons. I got this result:
It is obvious that the button location is wrong. It seems to me that the button's grid does not…

Qingheyu
- 3
- 2
-1
votes
1 answer
Certain label wont work with .grid() function from tkinter
It seems that I explained my problem very terribly, but I have a problem with the grid function on my label. The label does show up but, I cant change the row/column of it or do any function inside of the brackets.
I put the code of how to replicate…

Grusen
- 31
- 4
-1
votes
1 answer
how do i make a Tkinker widget ignore the width of the widget in the row above it(and just float to the left)?
I'm trying to create a calculator type of layout but the numbers mess up when I add the output field.
import Tkinter as tk
window = tk.Tk()
window.title("BUTTON CALCULATOR")
window.geometry("400x400")
#----OutPut----
answer_output =…

DeDude
- 1
- 1
-1
votes
1 answer
Tk geometry management when passing through modules
Conceptually, if I define a Frame and create it using, say, grid, then within Frame can I use any of the geometry managers? Below is a MWE. My problem is I am trying to write a GUI where the base layout is with grid, but within those widgets I am…

superhero
- 185
- 3
- 16
-1
votes
1 answer
how to make the background image in a canvas expand with the window?
I am trying to set the background image of weather app I tried to use canvas for that but the image doesn't expand as the window and it expands only when I click search to see the results , the labels come out messy as although I used grid
can…

k.john
- 1
- 2
-1
votes
1 answer
Destroy tkinter frame within method
This is Python version 3.6.2
Below is my method of getting news through the Google New's RSS feed. I am trying to delete the frame so that when the method is called again the text is erased and replaced with new text. How would I go about removing…

PWRxPSYCHO
- 1
- 5
-2
votes
1 answer
How do I align rows of two frames in tkinter?
I have two frames in tkinter. One of them has labels, while the other has text fields and buttons. When a user clicks a button, more fields get added horizontally in the second frame. Both frames are connected to one vertical scrollbar, and the…

Vik
- 137
- 1
- 8
-2
votes
1 answer
python tkinter layout - Creating Two Text Widgets With Scrollbar in a Full-screen Window and a few other additional widgets
I want to create a program that opens in full-screen and in which the left side of the program window is a Text widget with a scrollbar on the right, such that it's width is 60% of the screen width and the right side is also a Text widget with a…

Michael Novak
- 105
- 5
-2
votes
1 answer
Upload image in tkinter grid
Trying to split my parent window in several functional parts, one of which will be dealing with weather
data and etc and another one will be located in the right side and contain the map image, preferably extending at full height. The image doesn't…

Olexiy Usov
- 21
- 2
-2
votes
1 answer
Strange behavior of frames in tkinter
I have a project I am working on and it requires me to update a frame with new page information depending on what button is clicked.
I have 2 frames in the main page. One frame holds the buttons and the other frame is to be updated on button click.…

Mike - SMT
- 14,784
- 4
- 35
- 79
-2
votes
2 answers
Tkinter frame showing up outside its parent
I'm trying to grid a label inside its parent frame but it instead shows up at the bottom of the window, nowhere that I can think is even related to where I told it to go.
Here is my code:
class Window:
def __init__(self, root):
#configure the…

Ethan Fraser
- 1
- 1
-2
votes
1 answer
Simplist way to display Arduino serial data in label
I have searched high and low. What is the smallest amount of code to show text of a temprature reading from an arduino in a window that updates every second?

Matthew Ian Clarke
- 37
- 10