exact x,y positioning of a Tk widget
revyakin at yahoo.com
Fri Aug 30 12:10:10 EDT 2002
Thank you all! Your suggestions surely helped a lot.
Eric Brunel <eric.brunel at pragmadev.com> wrote in message news:<aknffk$99k$1 at wanadoo.fr>...
> revyakin wrote:
> > Is there a way to position a widget with exact x,y coordinates,
> > instead of just justifying to the left, right, top and bottom?
> You may also use the "place" method:
> from Tkinter import *
> root = Tk()
> b = Button(root, text='OK')
> b.place(x=20, y=30)
> This does exactly what you want. But consider understanding, then using the
> "grid" method: it's far more adaptable than "pack" or "place" methods. It
> particularly handles a lot better window resizing.
More information about the Python-list