GUI

Harry Gascoigne

#RORY

 

#establish elements of GUI

 

interface.title("Re-psych-ology")

interface.geometry("1000x500")

app = Frame(interface)

app.grid()

 

#ASSIGNING BUTTONS

 

self.bttn + Button (app, text = "Push this button if this changes your view of SAS paper usage")

self.bttn.grid()

self.bttn["command"] = class Application(Frame):

def __init__(self, master):

   

super(Application, self) .__init__(master)

self.grid() self.bttn_clicks = 0

self.create_widget()

def create_widget(self):

self.bttn = Button(self)

self.bttn ['test'] = "Total Clicks: 0"

self.bttn ['command'] = self.update_count

self.bttn.grid()

def update_count(self): self.bttn_clicks += 1:

self.bttn['test'] = "Total Clicks: " + str(self.bttn_clicks)

root = Tk() root.title("Click Counter")

root.geometry('200x50')

app = Application (root)

 

#loop the gui

root.mainloop()

interface.mainloop()

datetime.mainloop()