⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ controles standards ⇨ Toplevel
tkinter.Toplevel ( ).withdraw ( )
⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ controles standards ⇨ Toplevel
tkinter.Toplevel ( ).withdraw ( )
DESCRIPTION.
Cache la fenêtre en l'effaçant de l'écran.
SYNTAXE.
TKI_Fenetre.withdraw ( )
TKI_Fenetre ⇨ instance quelconque de tkinter.Toplevel ( ) [ OBLIGATOIRE ]
.withdraw ( ) ⇨ appel de la méthode [ OBLIGATOIRE ]
ou
TKI_Fenetre.wm_withdraw ( )
TKI_Fenetre ⇨ instance quelconque de tkinter.Toplevel ( ) [ OBLIGATOIRE ]
.wm_withdraw ( ) ⇨ appel de la méthode [ OBLIGATOIRE ]
REMARQUES.
La méthode tkinter.Toplevel ( ).deiconify ( ) fera réapparaître la fenêtre à la même position et avec les mêmes dimensions.
La méthode tkinter.Toplevel ( ).iconify ( ) fera réapparaître la fenêtre en mode icone.
La forme TKI_Fenetre.wm_withdraw ( ) appelle la méthode wm_withdraw ( ) héritée de la classe tkinter.Wm ( ), le window manager de tkinter, qui gère la communication avec le gestionnaire de fenêtres de l'OS présent sur la machine accueillant le programme.
EXEMPLE.
import tkinter
TKI_Principal = tkinter.Tk ( )
TKI_Principal.geometry ( "+100+100" )
tkinter.Button ( TKI_Principal , text = "Cacher ..." , command = lambda : TKI_Action.withdraw ( ) ).pack ( fill = "both" )
tkinter.Button ( TKI_Principal , text = "Rétablir ..." , command = lambda : TKI_Action.deiconify ( ) ).pack ( fill = "both" )
tkinter.Button ( TKI_Principal , text = "Réduire ..." , command = lambda : TKI_Action.iconify ( ) ).pack ( fill = "both" )
tkinter.Label ( TKI_Principal , text = "... la fenêtre action." ).pack ( fill = "both" )
TKI_Action = tkinter.Toplevel ( )
TKI_Action.geometry ( "320x240+300+100" )
tkinter.Button ( TKI_Action , text = "Quitter" , command = TKI_Principal.destroy ).pack ( )
TKI_Principal.mainloop ( )
Votre aide est précieuse pour améliorer ce site, alors n'hésitez pas à faire part de