Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Absolute positioning of Python tkinter elements [closed]

Tags:

python

tkinter

How can I make tkinter elements with absolute positioning so they don't push each other?

like image 909
new programmer Avatar asked Oct 26 '25 07:10

new programmer


1 Answers

Hard to tell what exactly you are looking for. If so far you've only used the pack() method for your layout, you should use grid(). Personally, I think grid() is flexible enough for most layouts, while at the same time being somewhat sane, i.e., preventing elements from overlapping each other.

If this is still too restrictive for your purposes, and you really want to position elements by their (x, y) coordinates, you can use the place() method.

Here's a nice tutorial, explaining the several layout management methods for Tkinter in detail, starting with absolute layout.

like image 179
tobias_k Avatar answered Oct 28 '25 21:10

tobias_k



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!