I'm making a tkinter application in python, in which I have a frame where I want to show 4-5 pictures. The code above the hashtags is working fine, it shows 1 pictures.
But the code below the picture is bad for some reason. It doesn't show anything, but it should show 4 pictures. Do I need to make a list from the PhotoImages or is something wrong with the self-s?
Thanks
self.photo = PhotoImage(file=onlyfiles[0])
self.photo = self.photo.subsample(4, 4)
label=Label(self, image=self.photo)
label.pack()
################################################
image_labels = []
for i in range(len(onlyfiles)): # 4
self.gombi = PhotoImage(file=onlyfiles[i])
self.gombi = self.gombi.subsample(4, 4)
image_labels.append(Label(self, image=self.gombi))
image_labels[i].pack()