1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| from tkinter import *
# ____________________________________________________________________________________________________________________
# Création de l'instance Tk
fen2 =Tk()
# ____________________________________________________________________________________________________________________
# MAIN : Lancement du programme Principal
# Création fenêtre principale
fen2.geometry('500x200')
# ____________________________________________________________________________________________________________________
# CREATION OBJETS
# Créations - Frame
objFrame1 = LabelFrame(fen2, text="Résultat", padx=20, pady=5)
# fenêtre RESULTAT
# Créa objet Label
objLabel5 = Label(objFrame1 ,height=1 ,width=20, text="Adresse mail", padx=5)
objLabel6 = Label(objFrame1 ,height=1 ,width=20, text="Agence", padx=5)
# Créa objet Label/Objet
objMailNom = Label(objFrame1 ,height=1 ,width=20, relief=SUNKEN, padx=5)
objMailNomBout =Button(objFrame1, bg ="Red", padx=5)
objAgence = Label(objFrame1 ,height=1 ,width=20, relief=SUNKEN, padx=5)
objMailAgenceBout =Button(objFrame1, bg ="Red", padx=5)
# ____________________________________________________________________________________________________________________
# positionnement frame
objFrame1.pack(fill="both", expand="yes", padx=5, pady=5) # fill both : extension a yes donc both sinon que sur x ou y
# Position des objets Ligne 3
objLabel5.grid(row=1, column=1)
objMailNom.grid(row=2, column=1)
objMailNomBout.grid(row=2, column=2)
objLabel6.grid(row=1, column=4)
objAgence.grid(row=2, column=4)
objMailAgenceBout.grid(row=2, column=5, sticky='E')
# ____________________________________________________________________________________________________________________
fen2.mainloop() |
Partager