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
| from tkinter import *
#class
class AirportGUI(Tk):
def __init__(self):
Tk.__init__(self)
self.title('Airport Gesture')
self.timeFrame()
self.colorFrame()
self.arrivalsFrame()
self.departuresFrame()
self.configure(bg='black')
def timeFrame(self):
Frame(self, width = 600, height = 150, bg = 'white', relief=SUNKEN).\
grid(row=1, column=1, rowspan=3, columnspan=6, pady=15, padx=15)
def colorFrame(self):
self.c = Canvas(self, width = 400, height = 150, bg = 'white')
self.c.grid(row=1, column=7, rowspan=3, columnspan=4, pady=15, padx=15)
Scale(self.c).pack()
self.c.configure(bg='white', width = 400, height = 150)
def arrivalsFrame(self):
self.a = Frame(self, width = 500, height = 650, bg = 'white')
self.a.grid(row=4, column=1, columnspan=5, rowspan=13, pady=15, padx=15)
Label(self.a, text='Colors', bg='white').grid()
def departuresFrame(self):
Frame(self, width = 500, height = 650, bg = 'white').\
grid(row=4, column=6, columnspan=5, rowspan=13, pady=15, padx=15)
AirportGUI().mainloop() |
Partager