I have this clock app written in python. It runs successfully on Windows.
Here is the source code.
# Source: https://www.geeksforgeeks.org/python-create-a-digital-clock-using-tkinter/
# importing whole module
from tkinter import *
from tkinter.ttk import *
# importing strftime function to
# retrieve system's time
from time import strftime
# creating tkinter window
root = Tk()
root.title('Clock')
# This function is used to
# display time on the label
def time():
string = strftime('%H:%M:%S %p')
lbl.config(text=string)
lbl.after(1000, time)
# Styling the label widget so that clock
# will look more attractive
lbl = Label(root, font=('calibri', 40, 'bold'),
background='purple',
foreground='white')
# Placing clock at the centre
# of the tkinter window
lbl.pack(anchor='center')
time()
mainloop()
This is how the clock app looks.
It works fine. However, I want to make the app always appear on top in Windows. How can I modify the code to make the app always appear on top?
I am using Windows 11.