⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ liste des attributs
tkinter.buttonbackground
⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ liste des attributs
tkinter.buttonbackground
DESCRIPTION.
Définit ou retourne la couleur du fond des flèches d'une boite de sélection.
SYNTAXE.
buttonbackground = couleur
REMARQUES.
couleur doit être un str ( ) représentant une couleur valide. Par défaut couleur vaut "#D9D9D9".
Par exemple pour les couleurs les plus courantes :
- noir :background = "black" ;
- rouge : background = "red" ;
- vert citron : background = "lime" ;
- jaune : background = "yellow" ;
- bleu : background = "blue" ;
- fushia : background = "magenta" ;
- cyan : background = "aqua" ;
- blanc : background = "white" ;
- marron : background = "maroon" ;
- vert : background = "green" ;
- bleu marine : background = "navy" ;
- olive : background = "olive" ;
- violet : background = "purple" ;
- sarcelle : background = "teal" ;
- gris : background = "gray" ;
- argent : background = "argent" ;
Le comportement de cet attribut, peut varier selon la combinaison controle / environnement utilisée. Il peut même, dans certain cas, être ignoré. Voir les couleurs avec tkinter pour plus de d'informations sur la désignation des couleurs.
EXEMPLE.
import tkinter
def FNC_Couleurs ( ) :
SPI_Couleurs [ "buttonbackground" ] = SPI_Couleurs.get ( )
TKI_Principal = tkinter.Tk ( )
BUT_Quitter = tkinter.Button ( TKI_Principal , text = "Quitter" , command = TKI_Principal.destroy )
SPI_Couleurs = tkinter.Spinbox ( TKI_Principal , wrap = True , command = FNC_Couleurs )
SPI_Couleurs.pack ( fill = "both" )
BUT_Quitter.pack ( fill = "both" )
SPI_Couleurs [ "values" ] = ( "red" , "lime" , "blue" , "yellow" , "magenta" , "aqua" , "black" , "white" )
FNC_Couleurs ( )
TKI_Principal.mainloop ( )
Votre aide est précieuse pour améliorer ce site, alors n'hésitez pas à faire part de