⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ extension ttk ⇨ liste des attributs
tkinter.ttk.postoffset
⇨ MENU ⇨ MODULES ⇨ tkinter ⇨ extension ttk ⇨ liste des attributs
tkinter.ttk.postoffset
DESCRIPTION.
Définit, ou retourne, les marges dans la liste à développer.
SYNTAXE.
postoffset = dimension
REMARQUES.
ancre doit être un str ( ) représentant une ancre valide. Les ancres valides sont :
- "n", centrer en haut ;
- "ne", en haut à droite ;
- "e", center à droite ;
- "se", en bas à droite ;
- "s", centrer en bas ;
- "sw", en bas à gauche ;
- "w", centrer à gauche ;
- "nw", en haut à gauche ;
EXEMPLE.
import tkinter , tkinter.ttk
def FNC_Taille ( event ) :
kdonnees = ( SCA_Abscisse.get ( ) , SCA_Ordonnee.get ( ) , SCA_Largeur.get ( ) , SCA_Hauteur.get ( ) )
tkinter.ttk.Style ( ).configure ( "TCombobox" , postoffset = kdonnees )
TKI_Principal = tkinter.Tk ( )
BUT_Quitter = tkinter.Button ( TKI_Principal , text = "Quitter" , command = TKI_Principal.destroy )
SCA_Abscisse = tkinter.Scale ( TKI_Principal , orient = "horizontal" , to = 100 , command = FNC_Taille )
SCA_Ordonnee = tkinter.Scale ( TKI_Principal , orient = "horizontal" , to = 100 , command = FNC_Taille )
SCA_Largeur = tkinter.Scale ( TKI_Principal , orient = "horizontal" , to = 1000 , command = FNC_Taille )
SCA_Hauteur = tkinter.Scale ( TKI_Principal , orient = "horizontal" , to = 1000 , command = FNC_Taille )
CHX_Choix = tkinter.ttk.Combobox ( TKI_Principal , values = ( "Aaa" , "Bbb" , "Ccc" , "Ddd" , "Eee" ) )
SCA_Abscisse.pack ( )
SCA_Ordonnee.pack ( )
SCA_Largeur.pack ( )
SCA_Hauteur.pack ( )
CHX_Choix.pack ( )
BUT_Quitter.pack ( )
TKI_Principal.mainloop ( )
Votre aide est précieuse pour améliorer ce site, alors n'hésitez pas à faire part de