All images are getting into garbage collection except the last one. How to show all images?
t = 1
images = []
while t < total_t[0][0]:
row = self.database.db_query(F"SELECT * FROM {self.database.main_table} where T_ID = {t}")
t_type = row[0][1]
t_kind = row[0][2]
t_note = row[0][3]
t_date = row[0][4]
t_ammount = row[0][5]
self.img = tk.PhotoImage(file=f"{transactions_path}{t-1}.png")
images.append(self.img)
t+=1
for index, image in enumerate(images):
self.image = image
tk.Label(self.content_view_frame, image=self.image).grid(row=index)
self.image
. Changeimages
toself.images
and it should work.