-
Notifications
You must be signed in to change notification settings - Fork 0
/
pop.py
50 lines (28 loc) · 842 Bytes
/
pop.py
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
34
35
36
37
38
39
40
41
from tkinter import *
Liste = ['Test', 'Test 2', 'Test 3', 'Test 4']
def valide():
"""var = saisie.get()
print(var)
Liste.append(var)
print(Liste)"""
var = saisie.get()
def rm():
print(Liste)
Liste.pop()
print(Liste)
root = Tk()
root.geometry('500x500+700+0')
root['bg'] = 'bisque'
can = Canvas(root, width = 500, height = 500, bg = 'white')
can.pack()
saisie = StringVar()
Champ = Entry(root, textvariable = saisie, bg = 'grey', fg = 'black')
Champ.place(relx = 0.1, rely = 0.1)
nombre = StringVar()
Write = Entry(root, textvariable = nombre, bg = 'grey', fg = 'black')
Write.place(relx = 0.1, rely = 0.4)
Valider = Button(root, text = 'Valider', command = valide)
Valider.place(relx = 0.7, rely = 0.1)
BPop = Button(root, text = 'Pop', command = rm)
BPop.place(relx = 0.7, rely = 0.4)
root.mainloop()