-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloWorldGraphical.py
More file actions
58 lines (47 loc) · 1.31 KB
/
Copy pathHelloWorldGraphical.py
File metadata and controls
58 lines (47 loc) · 1.31 KB
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
#!/usr/bin/env
# -*- coding: utf-8 -*-
"""
Submission for Project Milestone 1, Task 3
by Aleksandra Kukawka
and Daso Jung
"""
from tkinter import *
window = Tk()
window.geometry('250x300')
languageLabel = Label(window, text= 'Please select a language.', fg = '#F6A800')
languageLabel.pack(pady=4)
# button to display German greeting
deuBtn = Button(window,
text='Deutsch',
width=25,
# change languageLabel text when user selects the button
command = lambda: languageLabel.config(text='Guten Tag')
)
# button to display English greeting
engBtn = Button(window,
text='English',
width=25,
# change languageLabel text when user selects the button
command = lambda: languageLabel.config(text='Good morning')
)
# button to display English greeting
fraBtn = Button(window,
text='Français',
width=25,
# change languageLabel text when user selects the button
command = lambda: languageLabel.config(text='Bonjour')
)
# button to quit the window
quitBtn = Button(window,
text='Quit',
width=5,
# destroy the window when user selects the button
command=window.destroy
)
# display elements on the window
deuBtn.pack(pady=4)
engBtn.pack(pady=4)
fraBtn.pack(pady=4)
# push the quit button to right bottom corner
quitBtn.pack(pady=4, side=BOTTOM, anchor='e')
window.mainloop()