Make Tkinter child window active
Eugene Druker
ledruker at rogers.com
Thu Jun 9 00:42:36 EDT 2005
Try:
>
> Label(c, text="Child window").grid()
c.focus_set()
> root = Tk()
"Svennglenn" <Danielnord15 at yahoo.se> wrote in message
news:1118253789.591161.88220 at o13g2000cwo.googlegroups.com...
> 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