-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.py
More file actions
26 lines (22 loc) · 964 Bytes
/
Copy pathinterface.py
File metadata and controls
26 lines (22 loc) · 964 Bytes
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
# interface.py
import tkinter as tk
from customtkinter import CTkFrame
from formulaire import Formulaire
from accueil import Accueil
class Interface(CTkFrame):
def __init__(self, master=None):
super().__init__(master)
self.master = master
self.setup()
def setup(self):
# Initialisation et configuration du frame
color_back = "#fffcfc"
self.configure(fg_color=color_back)
self.main_frame = CTkFrame(self, fg_color=color_back)
self.main_frame.grid(sticky="nsew")
self.main_frame.place(relx=0.5, rely=0.5, anchor="center")
# Création des "pages" en évitant une initialisation circulaire
self.formulaire = Formulaire(self.master, self.main_frame, self)
self.accueil = Accueil(self.master, self.main_frame, self.formulaire)
self.formulaire.set_accueil(self.accueil)
self.formulaire.afficher_formulaire() # Lancer l'accueil par défaut