merge-gui #4
60
GUI/main.py
60
GUI/main.py
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
from tkinter import *
|
from tkinter import *
|
||||||
|
import tkinter as tk
|
||||||
|
|
||||||
#creation première fenetre
|
#creation première fenetre
|
||||||
window = Tk()
|
window = Tk()
|
||||||
|
@ -12,31 +13,74 @@ window.maxsize(1920, 1080)
|
||||||
window.iconbitmap("GUI/bitmap.ico")
|
window.iconbitmap("GUI/bitmap.ico")
|
||||||
window.config(background='#35363a')
|
window.config(background='#35363a')
|
||||||
|
|
||||||
#création d'une frame
|
#CREATIONN DES FRAMES
|
||||||
|
#création d'une frame principale
|
||||||
frame = Frame(window, bg='#35363a')
|
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
|
#ajouter le titre
|
||||||
label_title = Label(frame, text="Aide au choix de la spécialité", font=("Arial", 31), bg='#35363a', fg='#d9d9d9')
|
label_title = Label(highframe, text="Aide au choix de la spécialité", font=("Arial", 31), bg='#35363a', fg='#d9d9d9')
|
||||||
#afficher le titre
|
#afficher le titre
|
||||||
label_title.pack()
|
label_title.pack()
|
||||||
|
|
||||||
#ajouter la description
|
#ajouter la description
|
||||||
label_subtitle = Label(frame, text="Cette application est une assistance pour le choix des EDS et du parcours post BAC", font=("Arial", 16), bg='#35363a', fg='#a6a6a6')
|
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
|
#afficher la description
|
||||||
label_subtitle.pack()
|
label_subtitle.pack()
|
||||||
|
|
||||||
#ajouter un champ de texte
|
#ajouter un champ de texte
|
||||||
metier = Entry(frame, text="Votre futur métier", font=("Arial", 16), bg='#35363a', fg='#a6a6a6')
|
metier = Entry(leftframe, font=("Arial", 16), bg='#35363a', fg='#a6a6a6')
|
||||||
#afficher le champ de texte
|
#afficher le champ de texte
|
||||||
metier.pack()
|
metier.pack(expand=YES, fill=X, pady=25)
|
||||||
|
|
||||||
#[ajouter un bouton]
|
#ajouter un bouton
|
||||||
onsp_button = Button(frame, text="onisep", font=("Arial", 16), bg='#737373', fg='#a6a6a6')
|
srch_button = Button(rightframe, text="Rechercher mes EDS", font=("Arial", 16), bg='#737373', fg='#a6a6a6')
|
||||||
#afficher le bouton
|
#afficher le bouton
|
||||||
onsp_button.pack()
|
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
|
#afficher la frame
|
||||||
frame.pack(expand=YES)
|
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
|
#affichage dans la boucle main
|
||||||
window.mainloop()
|
window.mainloop()
|
Loading…
Reference in a new issue