Make Tkinter child window active

Svennglenn Danielnord15 at yahoo.se
Wed Jun 8 14:03:09 EDT 2005


How do i make a child window "active" like the root window?

from Tkinter import *

def open_child():
    c = Toplevel(root)
    c.title("Child window")
    c.geometry('200x160+230+130')

    Label(c, text="Child window").grid()

root = Tk()
root.title("root window")

Button(root, text="Open child window", command=open_child).grid()

root.mainloop()


When the child windows opens i would like it to be active like the
root window, how can i easily do that?




More information about the Python-list mailing list