from tkinter import *
import sqlite3
fen=Tk()
fen.title('BD')
fen.config(bg= '#708090') #couleur gris ardoise
fen.geometry('400x400')
#fen.minsize(800,600)
#fen.maxsize(1000,900)
motacc=Label(fen, text='Formulaire à remplire',width=20,height=1,bg='light green')
motacc.pack()
frame=Frame(fen,bg= 'grey')
frame.pack(expand=1, fill=BOTH, padx=10, pady=10,) #cadre
canvas=Canvas(frame,bg='light grey')
canvas.grid(row=0, column=0, sticky=NW + SE)
#canvas1=Canvas(frame, bg='grey')
#canvas1.grid(row=0, column=1, sticky=NW + SE)
nom=Label(canvas, text= 'Nom:',width=25,height=1, bg='light blue')
nom.grid(column=0,row=0,padx=100,pady=25)
infonom=Entry(canvas, width=30,bg='light grey')
infonom.grid(column=1,row=0,padx=100,pady=25)
prenom=Label(canvas, text= 'Prenom:',width=25,height=1, bg='light blue')
prenom.grid(column=0,row=1,padx=100,pady=25)
infonom1=Entry(canvas, width=30,bg='light grey')
infonom1.grid(column=1,row=1,padx=100,pady=25)
matri=Label(canvas, text= 'Maricule:',width=25,height=1, bg='light blue')
matri.grid(column=0,row=2,padx=100,pady=25)
infonom2=Entry(canvas, width=30,bg='light grey')
infonom2.grid(column=1,row=2,padx=100,pady=25)
sex=Label(canvas, text= 'Sexe:',width=25,height=1, bg='light blue')
sex.grid(column=0,row=3,padx=100,pady=25)
infonom3=Entry(canvas, width=30,bg='light grey')
infonom3.grid(column=1,row=3,padx=100,pady=25)
bouton1=Button(frame,text= 'VALIDER',width=15,height=1, bg='light blue')
bouton1.place(x=320,y=300)#grid(column=0,row=4,padx=100,pady=25)
bouton2=Button(frame,text= 'Visualiser',width=15,height=1, bg='light blue')
bouton2.place(x=320,y=350)#column=0,row=5,padx=100,pady=25)
from tkinter import ttk
root=Tk()
labellistetudiants= Label(root,text='Liste etudiants',bg='darkblue',fg='white')
labellistetudiants.grid(row=9,column=1)
table=ttk.Treeview(root)
table.grid(row=10,column=1)
table['columns']=('nom_id','prenom_id','matricule_id','sexe_id')
table.column('#0',width=0, stretch=NO)
table.column('nom_id',anchor=CENTER,width=80)
table.column('prenom_id',anchor=CENTER,width=80)
table.column('matricule_id',anchor=CENTER,width=80)
table.column('sexe_id',anchor=CENTER,width=80)
table.heading('#0',text='',anchor=CENTER)
table.heading('nom_id',text='Nom',anchor=CENTER)
table.heading('prenom_id',text='Prenom',anchor=CENTER)
table.heading('matricule_id',text='Matricule',anchor=CENTER)
table.heading('sexe_id',text='Sexe',anchor=CENTER)
fen.mainloop()