-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
73 lines (69 loc) · 2.47 KB
/
main.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#PLAN
# Combiner les quetres flash card sans accro!
from french_for_english import FrenchForEnglish
from english_for_french import EnglishForFrench
from japanese_for_english import JapaneseForEnglish
from japanese_for_french import JapaneseForFrench
from tkinter import *
BACKGROUND_COLOR = "#B1DDC6"
def selection():
choice = option.get()
if choice == "French for English":
root.destroy()
FrenchForEnglish()
elif choice == "English for French":
root.destroy()
EnglishForFrench()
elif choice == "Japanese for French":
root.destroy()
JapaneseForFrench()
else:
root.destroy()
JapaneseForEnglish()
root = Tk()
root.title("Choice your Option!")
root.minsize(width=200,height=200)
root.config(background="#B1DDC6",padx=20,pady=20)
option = StringVar()
choice1 = Radiobutton(root,
text="french for english",
variable=option,
value="French for English",
command=selection,
font=("Ariel",24,"italic"),
background=BACKGROUND_COLOR,
highlightthickness=0,
padx=10,pady=10)
choice1.pack()
choice2 = Radiobutton(root,
text="english for french",
variable=option,
textvariable="salut",
value="English for French",
command=selection,
font=("Ariel",24,"italic"),
background=BACKGROUND_COLOR,
highlightthickness=0,
padx=10,pady=10)
choice2.pack()
choice3 = Radiobutton(root,
text="japanese for english",
variable=option,
value="Japanese for English",
command=selection,
font=("Ariel",24,"italic"),
background=BACKGROUND_COLOR,
highlightthickness=0,
padx=10,pady=10)
choice3.pack()
choice4 = Radiobutton(root,
text="japanese for French",
variable=option,
value="Japanese for French",
command=selection,
font=("Ariel",24,"italic"),
background=BACKGROUND_COLOR,
highlightthickness=0,
padx=10,pady=10)
choice4.pack()
root.mainloop()