IconTest_v2
unknown
python
a year ago
577 B
18
Indexable
Never
import tkinter as tk def create_main_window(): root = tk.Tk() root.geometry("250x150") root.title("IconTest") icon_path = "C:/Users/Admin/PycharmProjects/IconTest/stopwatch-16.ico" root.iconbitmap(icon_path) frame = tk.Frame(root) frame.pack() icon_path_png = "C:/Users/Admin/PycharmProjects/IconTest/stopwatch-128.png" icon = tk.PhotoImage(file=icon_path_png) icon_label = tk.Label(frame, image=icon) icon_label.pack(side="left") root.mainloop() if __name__ == "__main__": create_main_window()