I am new to GUI programming and recently started working with tKinter.
My problem is that the program won't show my image, I'm suspecing that it is my code that is wrong, however, I would like somone to exactly explain to me how i can make it work...
Here's my code:
from tkinter import * # Import the tkinter module (For the Graphical User Interface)
from PIL import ImageTk, Imagewidth = 1920
height = 1080
RootGeo = str(width) + "x" + str(height) # Make a def for RootGeo so the Root geometry isn't hardcodeddef MakeWindow():# -----Root_Attributes-----Root = Tk()Root.geometry(RootGeo)Root.state("zoomed")# -----Root_Attributes, Root_Containers----- ### NOT WORKING ###__DISPlAY__ = Image.open("Display.png")__DISPLAY_RENDER__ = ImageTk.PhotoImage(__DISPlAY__)Display_icon = Label(Root, image=__DISPLAY_RENDER__)Display_icon.image = __DISPLAY_RENDER__Display_icon.place(x=0, y=0)# -----Root_Containers----- ### NOT WORKING ###Root.mainloop()MakeWindow()
Any and all help would be very appreciated.