⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ liste des attributs
tkinter.activerelief
⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ liste des attributs
tkinter.activerelief
DESCRIPTION.
Définit ou retourne l'aspect du curseur coulissant d'une barre de défilement, ou ascenseur, quand le pointeur de la souris est sur lui.
SYNTAXE.
activerelief = aspect
REMARQUES.
aspect doit être un str ( ) parmi l'un des styles suivants : "solid" - "flat" - "raised" - "sunken" - "groove" - "ridge".
EXEMPLE.
import tkinter
def FNC_Relief ( event ) :
krelief = BOX_Reliefs.get ( BOX_Reliefs.curselection ( ) )
BAR_Droite [ "activerelief" ] = krelief
BAR_Dessous [ "activerelief" ] = krelief
TKI_Principal = tkinter.Tk ( )
BUT_Quitter = tkinter.Button ( TKI_Principal , text = "Quitter" , bd = 5 , command = TKI_Principal.destroy )
BOX_Reliefs = tkinter.Listbox ( TKI_Principal , height = 6 , width = 7 , font = ( None , 22 ) )
BAR_Droite = tkinter.Scrollbar ( TKI_Principal , elementborderwidth = 8 , width = 40 )
BAR_Dessous = tkinter.Scrollbar ( TKI_Principal , elementborderwidth = 8 , orient = "horizontal" , width = 40 )
BUT_Quitter.grid ( row = 0 , column = 0 , columnspan = 2 , padx = 10 , pady = 10 , sticky = "nesw" )
BOX_Reliefs.grid ( row = 1 , column = 0 , sticky = "nesw" )
BAR_Droite.grid ( row = 1 , column = 1 , sticky = "nesw" )
BAR_Dessous.grid ( row = 2 , column = 0 , sticky = "nesw" )
BAR_Droite [ "command" ] = BOX_Reliefs.yview
BAR_Dessous [ "command" ] = BOX_Reliefs.xview
BOX_Reliefs [ "yscrollcommand" ] = BAR_Droite.set
BOX_Reliefs [ "xscrollcommand" ] = BAR_Dessous.set
for krelief in ( "solid" , "flat" , "raised" , "sunken" , "groove" , "ridge" ) :
BOX_Reliefs.insert ( "end" , krelief )
BOX_Reliefs.bind ( "<ButtonRelease>" , FNC_Relief )
BOX_Reliefs.bind ( "<KeyRelease-Up>" , FNC_Relief , add = "+" )
BOX_Reliefs.bind ( "<KeyRelease-Down>" , FNC_Relief , add = "+" )
BOX_Reliefs.select_set ( 2 )
FNC_Relief ( None )
TKI_Principal.mainloop ( )
Votre aide est précieuse pour améliorer ce site, alors n'hésitez pas à faire part de