⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ controles standards ⇨ PanedWindow
tkinter.PanedWindow ( ).panecget ( )
⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ controles standards ⇨ PanedWindow
tkinter.PanedWindow ( ).panecget ( )
DESCRIPTION.
Retourne la valeur d'un attribut d'une cellule contenant un controle d'un bandeau de controles.
SYNTAXE.
Valeur = FRM_Bandeau.panecget ( enfant , attribut )
Valeur = ⇨ variable qui recevra la valeur [ optionnel ]
FRM_Bandeau ⇨ instance de tkinter.PanedWindow ( ) [ OBLIGATOIRE ]
.panecget ( ) ⇨ appel de la méthode [ OBLIGATOIRE ]
enfant ⇨ controle référence [ OBLIGATOIRE ]
attribut ⇨ attribut à retourner la valeur [ OBLIGATOIRE ]
REMARQUES.
enfant doit être l'identifiant, le chemin ou une variable désignant un controle valide, existant, et présent dans le bandeau de controles.
attribut est un str ( ) désignant un attribut valide.
Contrairement à la méthode tkinter.PanedWindow ( ).paneconfig ( ), le nom de l'attribut doit être entouré d'une paire de guillemets (") ou d'une paire d'apostrophe (').
EXEMPLE.
import tkinter
def FNC_Gestion ( event ) :
FRM_Bandeau.paneconfig ( LAB_A , width = SCA_A.get ( ) )
FRM_Bandeau.paneconfig ( LAB_B , width = SCA_B.get ( ) )
FRM_Bandeau.paneconfig ( LAB_C , width = SCA_C.get ( ) )
LAB_A [ "text" ] = FRM_Bandeau.panecget ( LAB_A , "width" )
LAB_B [ "text" ] = FRM_Bandeau.panecget ( LAB_B , "width" )
LAB_C [ "text" ] = FRM_Bandeau.panecget ( LAB_C , "width" )
TKI_Principal = tkinter.Tk ( )
FRM_Bandeau = tkinter.PanedWindow ( TKI_Principal , relief = "solid" , sashrelief = "sunken" , height = 150 , width = 500 )
BUT_Quitter = tkinter.Button ( FRM_Bandeau , text = "Quitter" , command = TKI_Principal.destroy )
SCA_A = tkinter.Scale ( FRM_Bandeau , to = 100 , command = FNC_Gestion )
SCA_B = tkinter.Scale ( FRM_Bandeau , to = 100 , command = FNC_Gestion )
SCA_C = tkinter.Scale ( FRM_Bandeau , to = 100 , command = FNC_Gestion )
LAB_A = tkinter.Label ( FRM_Bandeau )
LAB_B = tkinter.Label ( FRM_Bandeau )
LAB_C = tkinter.Label ( FRM_Bandeau )
FRM_Bandeau.add ( SCA_A )
FRM_Bandeau.add ( LAB_A )
FRM_Bandeau.add ( SCA_B )
FRM_Bandeau.add ( LAB_B )
FRM_Bandeau.add ( SCA_C )
FRM_Bandeau.add ( LAB_C )
FRM_Bandeau.add ( BUT_Quitter )
FRM_Bandeau.pack ( )
SCA_A.set ( 30 )
SCA_B.set ( 60 )
SCA_C.set ( 45 )
TKI_Principal.mainloop ( )
Votre aide est précieuse pour améliorer ce site, alors n'hésitez pas à faire part de