Jan-14-2019, 07:59 AM
Hi Ceegen
Here is a working solution:
Here is a working solution:
import time import tkinter as tk APP_TITLE = "The Time" APP_XPOS = 100 APP_YPOS = 100 APP_WIDTH = 200 APP_HEIGHT = 100 class Application(object): def __init__(self, main_win): self.main_win = main_win self.time_var = tk.StringVar() self.build() def build(self): tk.Label(self.main_win, textvariable=self.time_var, width=10, fg='blue', font=('Helvetica', 30, 'bold')).pack(expand=True) self.update_time() def update_time(self): self.time_var.set(time.strftime('%H:%M:%S')) self.main_win.after(1000, self.update_time) def main(): main_win = tk.Tk() main_win.title(APP_TITLE) #main_win.geometry("+{}+{}".format(APP_XPOS, APP_YPOS)) main_win.geometry("{}x{}".format(APP_WIDTH, APP_HEIGHT)) app = Application(main_win) main_win.mainloop()wuf
![Wink Wink](https://python-forum.io/images/smilies/wink.png)