-
Notifications
You must be signed in to change notification settings - Fork 2
/
french_accents.py
51 lines (40 loc) · 1008 Bytes
/
french_accents.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
import tkinter as tk
from pyperclip import *
def make_button(character: str, r: int, c: int):
tk.Button(
text=character,
width=3,
height=1,
bg="medium turquoise",
fg="black",
highlightcolor="DodgerBlue2",
font=('Times', -40, 'bold'),
borderwidth=6,
command=lambda: copy(character)
).grid(row=r, column=c)
window = tk.Tk()
window.title(":)")
icon = tk.PhotoImage(file='images/icon.png')
window.iconphoto(False, icon)
label = tk.Label(
text="Accents! :)",
fg="medium turquoise",
bg="gray1",
width=14,
height=1,
font=('Courier', -32, 'bold')
)
label.grid(row=0, column=0, columnspan=3)
make_button('è', 1, 0)
make_button('ê', 1, 1)
make_button('é', 1, 2)
make_button('à', 2, 0)
make_button('â', 2, 1)
make_button('ç', 2, 2)
make_button('î', 3, 0)
make_button('ô', 3, 1)
make_button('ù', 3, 2)
make_button('ï', 4, 0)
make_button('ë', 4, 1)
make_button('ü', 4, 2)
window.mainloop()