⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ liste des attributs
tkinter.insertofftime
⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ liste des attributs
tkinter.insertofftime
DESCRIPTION.
Définit ou retourne la durée durant laquelle le curseur d'insertion dans les textes sera caché.
SYNTAXE.
insertofftime = duree
REMARQUES.
Si duree est un int ( ) indiquant la durée, en millisecondes (1 ms = 0,001 s ) durant laquelle le curseur d'insertion dans un texte sera caché. Par défaut duree vaut 300.
voir aussi insertontime.
Le comportement de cet attribut, peut varier selon l'environnement utilisée. Il peut même, dans certain cas, être ignoré.
EXEMPLE.
import tkinter
def FNC_Curseur ( event ) :
TXT_Editeur [ "insertontime" ] = SCA_Visible.get ( )
TXT_Editeur [ "insertofftime" ] = SCA_Cache.get ( )
TKI_Principal = tkinter.Tk ( )
BUT_Quitter = tkinter.Button ( TKI_Principal , text = "Quitter" , command = TKI_Principal.destroy )
SCA_Visible = tkinter.Scale ( TKI_Principal , orient = "horizontal" , to = 2000 , resolution = 100 , command = FNC_Curseur )
SCA_Cache = tkinter.Scale ( TKI_Principal , orient = "horizontal" , to = 2000 , resolution = 100 , command = FNC_Curseur )
TXT_Editeur = tkinter.Text ( TKI_Principal , width = 30 , height = 10 )
TXT_Editeur.grid ( row = 0 , column = 0 , columnspan = 2 , sticky = "nesw" )
tkinter.Label ( TKI_Principal , text = "Visible en ms :" , justify = "right" ).grid ( row = 1 , column = 0 , sticky = "se" )
SCA_Visible.grid ( row = 1 , column = 1 , sticky = "nesw" )
tkinter.Label ( TKI_Principal , text = "Caché en ms :" , justify = "right" ).grid ( row = 2 , column = 0 , sticky = "se" )
SCA_Cache.grid ( row = 2 , column = 1 , sticky = "nesw" )
BUT_Quitter.grid ( row = 3 , column = 0 , columnspan = 2 , sticky = "nesw" )
TXT_Editeur.insert ( "1.0" , "Python est un langage de programmation puissant et facile à apprendre." )
TXT_Editeur.insert ( "end + 1 line" , "\n\n" )
TXT_Editeur.insert ( "end + 1 line" , "Python is an easy to learn, powerful programming language." )
SCA_Visible.set ( 600 )
SCA_Cache.set ( 300 )
TXT_Editeur.focus_force ( )
TKI_Principal.mainloop ( )
Votre aide est précieuse pour améliorer ce site, alors n'hésitez pas à faire part de