Apr-10-2020, 01:11 AM
I would like to write a simple image viewer. I have already written it, when my friend said she wanted nothing from the pictures to appear in the program, just buttons, and if she and if she clicks on that button, it will pop up the image.
temp_row = -1 for i in range(len(image_list)): if i % 10 == 0 and i/10 > temp_row: temp_row += 1 Button(root, text="Image", command=lambda: open_pic(image_list[i])).grid(row=temp_row, column=(i % 10))Iknow this code always will open the last item in the list, but can I fix it somehow?