Search this site
Embedded Files
Mon Python pas à pas
  • Accueil
  • INSTRUCTIONS
  • METHODES
  • MODULES
  • LOGITHEQUE
Mon Python pas à pas
  • Accueil
  • INSTRUCTIONS
  • METHODES
  • MODULES
  • LOGITHEQUE
  • More
    • Accueil
    • INSTRUCTIONS
    • METHODES
    • MODULES
    • LOGITHEQUE

⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ liste des attributs

tkinter.to 

DESCRIPTION.


Définit ou retourne la dernière valeur de l'intervalle numérique d'une échelle de valeur.




SYNTAXE.


to = fin




REMARQUES.


fin est un int ( ) ou un float ( ). Par défaut, si to est omis, l'intervalle numérique d'une l'échelle de valeur fini à 100.




EXEMPLE.



import tkinter



def FNC_Modifier ( event ) :

SCA_Temoin [ "from_" ] = SCA_Debut.get ( )

SCA_Temoin [ "to" ] = SCA_Fin.get ( )

SCA_Temoin [ "resolution" ] = SCA_Pas.get ( )



TKI_Principal = tkinter.Tk ( ) 


FRM_Temoin = tkinter.LabelFrame ( TKI_Principal , text = " Témoin ... " )

SCA_Temoin = tkinter.Scale ( FRM_Temoin , orient = "horizontal" , digits = 4 )

SCA_Temoin.pack ( fill = "both" ) 


FRM_Modifier = tkinter.LabelFrame ( TKI_Principal , text = " Modifier ... " )

SCA_Debut = tkinter.Scale ( FRM_Modifier , orient = "horizontal" , from_ = -25 , to = 25 , command = FNC_Modifier )

SCA_Fin = tkinter.Scale ( FRM_Modifier , orient = "horizontal", from_ = -25 , to = 25 , command = FNC_Modifier )

SCA_Pas = tkinter.Scale ( FRM_Modifier , orient = "horizontal", from_ = 1 , to = 10 , resolution = .25 , command = FNC_Modifier )

SCA_Debut.pack ( fill = "both" ) 

SCA_Fin.pack ( fill = "both" ) 

SCA_Pas.pack ( fill = "both" ) 


SCA_Debut.set ( -10 )

SCA_Fin.set ( 10 )


FRM_Temoin.pack ( fill = "both" ) 

FRM_Modifier.pack ( fill = "both" ) 

tkinter.Button ( TKI_Principal , 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

vos remarques, vos commentaires et de vos suggestions. 

Google Sites
Report abuse
Page details
Page updated
Google Sites
Report abuse