Questions tagged [tkinter-layout]
378 questions
0
votes
1 answer
Align the content to the center using Tkinter
I am trying tkinter for the first time. I want to align all the input box and the contents to the middle of the dialogue box.Currently, it is in the left side. I want the whole thing in the image to be at the center from top and bottom as well.
Here…

Samrat Shrestha
- 77
- 6
0
votes
0 answers
What is the role of "master" in a tkinter widget?
I've been working under the assumption that a widget's master is the geometric container of the widget. But recently I found that .place, .pack
and .grid all accept an option in_ which allows you to position (that is, .place, .pack, or .grid, I'm…

Eduardo
- 1,235
- 16
- 27
0
votes
1 answer
How to add a floating text on a scrollable canvas in tkinter
I want to create a floating text (does not scroll even if the canvas below scrolls) in tkinter. I tried searching for floating labels but could not find.
Right now the parent of the canvas is a frame which is scrollable.

user239457
- 1,766
- 1
- 16
- 26
0
votes
1 answer
How can I get object from its unique id in Tkinter?
canvas=Canvas(...)
unique_id=canvas.create_rectangle(...)
unique_id.tag_bind(...)
I get this error because it is an integer
AttributeError: 'int' object has no attribute 'tag_bind'
I need to get the object

user239457
- 1,766
- 1
- 16
- 26
0
votes
1 answer
Button Layout with Tkinter?
I want to make my buttons a 2 x 2 grid on the bottom of the window with a canvas above them but the buttons always seem to stack weird when I use .pack(side = whatever).
A major thing I also want the buttons and canvas to have relative size i.e. %…

Roberto Chavo
- 33
- 1
- 5
0
votes
1 answer
Remove all widgets after clicking button?
I am creating a login/sign-up system using tkinter. When the user clicks on either login or sign-up, I want all widgets to disappear for new widgets to appear on the screen depending on if they clicked on login or sign-up. So if they clicked on…
user10220551
0
votes
1 answer
Is there any function that gets called when you exit an entry widget in tkinter?
I want to change the layout of Label when we exit the entry widget.
For Eg:
a. In the Layout state 1, The first label says "Entry all the names you want" and beside it you have an entry widget to get the details of names. Format is like number of…

Desperado
- 105
- 9
0
votes
1 answer
Is it possible to highlight the combobox when we hover over it using mouse ? Like the activebackground for menu button?
a. Is it possible to highlight the combobox when we hover the mouse over the button ?
b. Because if its menu button we have the option like activebackground which helps to highlight the menu button when the mouse is hovered over it.
I tried…

Vimo
- 1,061
- 3
- 12
- 22
0
votes
1 answer
Tkinter not able to fill the text box to the frame using grid. Used styling to add shadow and focus
Description
I am creating a canvas with scrollbar and adding frames with a text box in the frame and to fill the entire frame with no border. This will make it look as if the frame is the textbox. I have added shadow and styling to the frame (as…

Raj Mehta
- 314
- 1
- 4
- 20
0
votes
2 answers
How to enable selection of multiple rows in Tkinter listboxes?
I'm using the class below to draw scrollable tables with selectable elements. When the user clicks on one of the item I need that entire row to get highlighted (which works). But at the moment you can only select one row at a time. How to modify the…

DrOrpheum
- 23
- 6
0
votes
1 answer
How to set the default size of Frames inside a PanedWindow in tkinter?
I am working on a simple tkinter gui- one panedwindow and two frames inside it.
The resizing is working fine. The problem is that when I add the second frame to the same panedwindow, it takes up all the space as shown in the image. Is there a way to…

user3840530
- 290
- 1
- 4
- 14
0
votes
1 answer
Tkinter grid can't place anywhere but dead center of screen
So I just need a photo for a background, and then a button in a certain spot.
I have the background image loading, but now when I try and place the button it will only go straight into the center of the screen. If I make the column or row anything…

Hayden
- 147
- 1
- 1
- 10
0
votes
2 answers
Tkinter - How to center a Widget (Python)
I started with the GUI in Python and have a problem.
I've added widgets to my frame, but they're always on the left side.
I have tried some examples from the internet, but I did not manage it .
I tried .place, but it does not work for me. Can one…

yil98
- 33
- 1
- 8
0
votes
0 answers
I want to add entry boxes in the frame f1b, which in turn is placed on a canvas c1 (sorry not able to embed image under the postb
I want to add entry boxes in the frame f1b, which in turn is places on a canvas c1. When I add entries to frame f1b directly, frame is not visible. Or should I add them to canvas using create_window? Could someone please help me here..
from…

Aniket
- 11
- 4
0
votes
2 answers
How to delete rows in Tkinter?
Very new to python and Tkinter.
I'm trying to allow a user to enter a number which will then determine the number of lines that are displayed. However when a new number is submitted that is less than the previous number, old row are not…

person
- 96
- 12