-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.py
43 lines (34 loc) · 979 Bytes
/
gui.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
#!/usr/bin/env python3
from os.path import basename, splitext
import tkinter as tk
from PIL import Image, ImageTk
from prasatko import Prasatko
# from tkinter import ttk
class Application(tk.Tk):
name = "Prasátko"
def __init__(self):
super().__init__(className=self.name)
self.title(self.name)
self.bind("<Escape>", self.quit)
self.lbl = tk.Label(self, text="Prasátko")
self.lbl.pack()
imaghandler = Image.open("img/prasatko.png")
tkimage = ImageTk.PhotoImage(imaghandler)
self.img = tk.Label(self, image=tkimage)
self.img.image = tkimage
self.img.pack()
self.entry = tk.Entry(self)
self.entry.insert(0, 1234)
self.entry.pack()
text = """1000 x 1
200 x 1
20 x 1
10 x 1
2 x 2
"""
self.message = tk.Message(self, text=text)
self.message.pack()
def quit(self, event=None):
super().quit()
app = Application()
app.mainloop()