-
Notifications
You must be signed in to change notification settings - Fork 0
/
Window.py
64 lines (51 loc) · 2.66 KB
/
Window.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
from Tkinter import *
class Window():
self.__f = Tk()
self.__f.title("MyEls " + self.__version)
self.__f.resizable(FALSE, FALSE)
#self.__f.wm_iconbitmap("icon.png")
self.frameR0 = Frame(self.__f)
self.frameR1C0 = Frame(self.__f)
self.frameR1C1 = Frame(self.__f)
self.frameR1C2 = Frame(self.__f)
self.frameR2C0 = Frame(self.__f)
self.frameR2C1 = Frame(self.__f)
self.frameR2C2 = Frame(self.__f)
self.frameR3 = Frame(self.__f)
self.frameR0.configure( width="300", height="25")
self.frameR1C0.configure( width="100", height="50")
self.frameR1C1.configure( width="100", height="50")
self.frameR1C2.configure( width="100", height="50")
self.frameR2C0.configure( width="100", height="150")
self.frameR2C1.configure( width="100", height="150")
self.frameR2C2.configure( width="100", height="150")
self.frameR3.configure( width="200", height="30", bd=1, relief=GROOVE)
self.frameR0.grid(row=0, column=0, columnspan=3)
self.frameR1C0.grid(row=1, column=0)
self.frameR1C1.grid(row=1, column=1)
self.frameR1C2.grid(row=1, column=2)
self.frameR2C0.grid(row=2, column=0)
self.frameR2C1.grid(row=2, column=1)
self.frameR2C2.grid(row=2, column=2)
self.frameR3.grid(row=3, column=0, columnspan=3)
menubar = Menu(self.frameR0)
filemenu = Menu(menubar, tearoff=0)
filemenu.add_command(label="Preferenze")
filemenu.add_separator()
filemenu.add_command(label="Esci")
menubar.add_cascade(label="File", menu=filemenu)
self.__f.config(menu=menubar)
self.__StatusBar = Label(self.frameR3, text="Connessione in corso..")
self.__StatusBar.pack()
self.__ButtonAction = Button(self.frameR1C0, text="Accendi" )
self.__ButtonAction.pack({"side":"top", "padx":1, "pady":0})
self.__ButtonAction['command'] = self.ButtonClickAction
self.__ButtonPiu = Button(self.frameR2C2, text="+")
self.__ButtonPiu.pack({"side":"top", "padx":2, "pady":2})
self.__ButtonPiu['command'] = self.ButtonClickPiu
self.__ButtonMeno = Button(self.frameR2C0, text="-")
self.__ButtonMeno.pack({"side":"top", "padx":2, "pady":2})
self.__ButtonMeno['command'] = self.ButtonClickMeno
self.__Slider = Scale(self.frameR2C1, from_=0, to=10, resolution=1, label='Dimmer', command = self.SliderChange, orient=HORIZONTAL)
self.__active=FALSE
self.__Slider.pack()