def OnButtonClick(self): # Initialize 'Sync Kong' main window after user has connected self.top = Toplevel() self.top.title("Sync Kong") self.top.geometry("700x400+30+30") self.top.transient(self) self.wButton.config(state='disabled') # SyncKong's logo self.top.image = PhotoImage(file='assets/gorilla.gif') Label(self.top, image=self.top.image).pack() # Sync Button self.refresh = Button(self.top, text="Sync with Kong!", command=self.refresh) self.refresh.pack() # Back To Connect Button self.backButton = Button(self.top, text="Disconnect", command=self.OnChildClose) self.backButton.pack() self.lastupdate = Label(self.top, text='Latest Update: {}'.format(client.lastUpdate())) self.lastupdate.pack() self.lastUpdate()
def lastUpdate(self): self.lastupdate['text'] = 'Latest Update: {}'.format(client.lastUpdate()) self.after(6000,self.lastUpdate)