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