Questions tagged [tkinter-layout]
378 questions
2
votes
2 answers
How to spread widgets on screen?
Following is my sample code containing three labels and three entry fields:
import tkinter as tk
from tkinter import *
root = Tk()
root.resizable(width=False,…

Aman Khanna
- 367
- 3
- 7
- 16
2
votes
1 answer
How to properly use grid in tkinter
I'm pasting the all the code I have been working on for a "strip Chart". I can provide the original code I've taken it from if there is interest. The code works well and generates a chart as expected, but the grid layout is strange. The buttons and…

Mitch Anthony
- 23
- 6
2
votes
1 answer
How to use CEFPython to add a WebBrowser widget in a Tkinter window?
I want to display a WebBrowser inside my tkinter app. Per the example below:
##############
# label #
#————————————#
# webbrowser #
##############
Here is what I have…
2
votes
0 answers
creating a scrolling bar on the side with data already there
Ive noticed that the space I have for my window is not enough for all the information I need to put on the screen, Is there a way I can put a scrolling bar in without having to put text such as 'line 1, line 2, line 3.....'
def startaudit():
…

Julia
- 69
- 8
2
votes
1 answer
How to change just one side border width of a ttk.Entry?
I am trying to display a sudoku layout with tkinter grid and ttk entries (maybe, I am not using the right approach to achieve it). I would like to know if the style option of ttk entry has any way to change the border of just one side. I have…

Juan Villaseca
- 35
- 2
2
votes
1 answer
How do you make a drop down menu in Tkinter?
I have a quick question, how would you make a drop down menu in Tkinter like the one below:
This menu has a drop down option, how would you add a drop down in tkinter here is my code:
# Menu Bar
MenuBar =…

Skcoder
- 299
- 1
- 9
2
votes
1 answer
Python Tkinter Frame layout, weight, and resizing, Grid geometry manager
I guess I am not understanding something about the way Grid works...
My question seems related to this SO question:
Python tkinter Text widget fill fixed sized frame using grid
To which the answer was that weight needed to be given to an item in…

user1441004
- 386
- 1
- 5
- 13
2
votes
1 answer
How to scale my Tkinter program across different PPIs and screen resolutions
I have been developing an app for someone and we quickly realized that the app looks different between our laptops (and on my tablet its un-usable because of the ppi). I looked up what the problem was so I used starting_frame.tk.call('tk',…

Charlie Watson
- 71
- 1
- 2
- 10
2
votes
1 answer
Tkinter both 'sticky' and 'rowconfigure' did not fill the empty space
I have 2 frames inside root which called "header_frame" and "activity_frame" both are in the same column which is "column=0". I want both frames to be resizeable matching its root parent filling all empty space like this :
I have tried all grid…

greendino
- 416
- 3
- 17
2
votes
1 answer
Prevent Tkinter grid from dynamically resizing cells
I have a Tkinter class with a grid in it, each of the grid rows should be the same weight as stated in the row configuration and the content of the grid should not affect the grid dimensions as I turned propagation off.
This works fine as long as I…

Mercury
- 594
- 1
- 12
- 28
2
votes
1 answer
How do I make tkinter frame fill entire canvas and expand together with it?
I'd like to make a scrollable frame which fills entire cell in app window. When the window is resized the widgets in the frame should stay centered. Since frames are not scrollable I used canvas and placed a frame in its window. Scroll region was…

ilya_s
- 71
- 4
2
votes
0 answers
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
I am implementing a mousewheel event in tkinter
def on_mousewheel(event,canvas):
canvas.yview_scroll(event.delta,"units")
canvas.bind_all("", lambda event:on_mousewheel(event,canvas))
It gives me the error
UnicodeDecodeError:…

user239457
- 1,766
- 1
- 16
- 26
2
votes
1 answer
How to align or justify rows and columns when writing to file?
My code is a Tkinter application to create a bill and print it.
When creating the bill, the values are written to a text file. However, the output is not properly aligned, is there any way to specify a template with fixed arguments as positions for…

mdabdullah
- 596
- 1
- 9
- 25
2
votes
1 answer
Python - Tkinter text size not resizing
I am trying to make a window that resizes using Tkinter, and it works fine. But I want the font size to scale to proportion as well. The entry boxes resize perfectly but the text just stays the same size. Can I change the entry text size as well?…

Benjamin Sommer
- 1,058
- 3
- 15
- 35
2
votes
1 answer
Matplotlib NavigationToolbar widget is not displayed in Tkinter GUI
I'm designing a simple GUI with Tkinter composed of a ListBox (with Scrollbar) and a canvas (FigureCanvasTkAgg) to plot. The ListBox is a collection of variables (time series) that are drawn as a x-y plot upon selection. The layout is…

user1259970
- 333
- 3
- 14