'In some buttons, images are not displayed, but in others they do?
As seen in the image(attached below), the buttons marked with the blue arrow are displaying the images, but the buttons marked with the red arrow are not displaying the images, I am using the same method but still it doesn't work. I think it has something to do with the fact that these buttons are created with an array but not sure.
Btw the commands of the buttons for now are the same, still WIP
Buttons marked with the Blue arrow are displaying the images but the buttons marked with red are not.
Attached Image displaying the problem
if (len(array) == 0):
break
img4o = Image.open("images/update_black.png")
resize_img4 = img4o.resize((24, 24))
img4 = ImageTk.PhotoImage(resize_img4)
img5o = Image.open("images/delete_black.png")
resize_img5 = img5o.resize((24, 24))
img5 = ImageTk.PhotoImage(resize_img5)
btn_copy_user = Button(frame_main, text="Copy username", command=partial(removeEntry, array[i][0]))
btn_copy_user.grid(column=3, row=(i + 3), pady=10)
btn_copy_pass = Button(frame_main, text="Copy password", command=partial(removeEntry, array[i][0]))
btn_copy_pass.grid(column=4, row=(i + 3), pady=10)
btn_update = Button(frame_main, image=img4, command=partial(removeEntry, array[i][0]))
btn_update.grid(column=5, row=(i + 3), pady=10)
btn_delete = Button(frame_main, image=img5, command=partial(removeEntry, array[i][0]))
btn_delete.grid(column=6, row=(i + 3), pady=10)
i = i + 1
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
