On Mon, Nov 15, 2010 at 12:30 PM, <pyt...@bdurham.com> wrote:

> Any tips on how I can swap the position of 2 widgets who have been
> positioned in a parent container via pack() or grid()?
>

import Tkinter as tk
root = tk.Tk()
b1 = tk.Button(root, text='hi')
b2 = tk.Button(root, text='bye')

b1.pack()
b2.pack()

b1.pack_forget()
b1.pack()

------

As for grid I'm not sure how to do it unless you have placed them in
different row/column - then you just have to use widget.grid(row=widget2row,
column=widget2col)
widget2.grid(row=widget1col, column=widget1col)

Well, that pattern.

HTH,
Wayne
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to