86 lines
2 KiB
Python
86 lines
2 KiB
Python
|
|
from tkinter import *
|
|
import tkinter as tk
|
|
|
|
#creation première fenetre
|
|
window = Tk()
|
|
|
|
#personnalisation fenêtre
|
|
window.title("Choix EDS")
|
|
window.geometry("1080x720")
|
|
window.minsize(480, 360)
|
|
window.maxsize(1920, 1080)
|
|
window.iconbitmap("GUI/bitmap.ico")
|
|
window.config(background='#35363a')
|
|
|
|
#CREATIONN DES FRAMES
|
|
#création d'une frame principale
|
|
frame = Frame(window, bg='#35363a')
|
|
|
|
#création d'une frame haute
|
|
highframe = Frame(frame, bg='#35363a')
|
|
|
|
#création d'une frame basse
|
|
bottomframe = Frame(frame, bg='#35363a')
|
|
|
|
#création d'une frame gauche
|
|
leftframe = Frame(bottomframe, bg='#35363a')
|
|
|
|
#création d'une frame droite
|
|
rightframe = Frame(bottomframe, bg='#35363a')
|
|
|
|
|
|
|
|
#AJOUT ET AFFICHAGE DES ELEMENTS
|
|
|
|
#ajouter le titre
|
|
label_title = Label(highframe, text="Aide au choix de la spécialité", font=("Arial", 31), bg='#35363a', fg='#d9d9d9')
|
|
#afficher le titre
|
|
label_title.pack()
|
|
|
|
#ajouter la description
|
|
label_subtitle = Label(highframe, text="Cette application est une assistance pour le choix des EDS et du parcours post BAC", font=("Arial", 16), bg='#35363a', fg='#a6a6a6')
|
|
#afficher la description
|
|
label_subtitle.pack()
|
|
|
|
#ajouter un champ de texte
|
|
metier = Entry(leftframe, font=("Arial", 16), bg='#35363a', fg='#a6a6a6')
|
|
#afficher le champ de texte
|
|
metier.pack(expand=YES, fill=X, pady=25)
|
|
|
|
#ajouter un bouton
|
|
srch_button = Button(rightframe, text="Rechercher mes EDS", font=("Arial", 16), bg='#737373', fg='#a6a6a6')
|
|
#afficher le bouton
|
|
srch_button.pack()
|
|
|
|
|
|
#AFFICHAGE DES FRAMES
|
|
#affichage frame haute
|
|
highframe.pack(side=TOP)
|
|
|
|
#affichage frame basse
|
|
bottomframe.pack(side=BOTTOM)
|
|
|
|
#affichage frame droite
|
|
rightframe.pack(side=RIGHT, padx=10)
|
|
|
|
#affichage frame gauche
|
|
leftframe.pack(side=LEFT, padx=10)
|
|
|
|
#afficher la frame
|
|
frame.pack(expand=YES)
|
|
|
|
#TRAITER INFORMATION USER
|
|
#Récupérer l'éntrée dans une variable
|
|
# Association de l'évènement actionEvent au champ de saisie
|
|
|
|
def actionEvent(event):
|
|
metier.configure(metier.get())
|
|
|
|
metier.bind("<Return>", actionEvent)
|
|
search = StringVar(metier)
|
|
|
|
|
|
|
|
#affichage dans la boucle main
|
|
window.mainloop() |