⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ liste des attributs
tkinter.bitmap
⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ liste des attributs
tkinter.bitmap
DESCRIPTION.
Définit ou retourne quelle image BitMap il faudra insérer dans le controle, à la place du texte.
SYNTAXE.
bitmap = image
REMARQUES.
image doit être un str ( ) désignant le fichier image, au format .xbm à la norme X11, à insérer. Il faut faire précéder le nom du fichier par le symbole @, le tout entre guillemets (bitmap = "@nom du fichier"), sauf s'il s'agit de l'une des images BitMap conventionnelles ci-après, disponibles avec leur seul nom standardisé : "error" - "hourglass" - "info" - "questhead" - "question" - "warning" - "gray75" - "gray50" - "gray25" - "gray12".
EXEMPLE.
import tkinter
TKI_Principal = tkinter.Tk ( )
for kicone in ( "error" , "hourglass" , "info" , "questhead" , "question" , "warning" , "gray75" , "gray50" , "gray25" , "gray12" ) :
tkinter.Label ( TKI_Principal , bitmap = kicone ).pack ( side = "left" )
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