[Tkinter-discuss] transient

Georges Arsouze georges.arsouze at gmail.com
Tue Apr 5 08:57:08 CEST 2011


Hi
I'm working with Python 3 on mac os 10.6

the transient window doesn't works (a transient toplevel is always drawn on
the top of its parent and is hidden if the parent is iconified or withdrawn)


from tkinter import *
"La fenêtre mère"
fenetre=Tk()
fenetre.title("Fenêtre mère")
Label(fenetre,text="Il s'agit ici de la fenêtre mère").pack(pady=10)

"Une première fenêtre fille"
"Fenêtre totalement indépendante, seulement la destruction de sa mère
entraine sa propre destruction"
fille1=Toplevel(fenetre)
fille1.title("Fille 1 (indépendante)")
Label(fille1,text="Fenêtre fille totalement
indépendante").pack(padx=10,pady=10)

"Une seconde fille"
"Fenêtre de type transient (déssinée au dessus de sa mère, cachée si la mère
est iconifiée ou retirée"
fille2=Toplevel(fenetre)
fille2.title("Fille 2 (de type transient)")
Label(fille2,text="Fenêtre fille de type transient").pack(padx=10,pady=10)
fille2.transient(fenetre)
# transient ne marche pas

"Une troisième fille"
"Fenêtre ne pouvant être ni bougée, ni retaillée"
fille3=Toplevel(fenetre)
Label(fille3,text="Fenêtre fille sans décoration",bg='blue',
fg='white').pack(fill=BOTH,expand=YES)
fille3.overrideredirect(1)
fille3.geometry("200x70+150+400")



fenetre.mainloop()

Can you help me
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110405/53404098/attachment.html>


More information about the Tkinter-discuss mailing list