I have this piece of code which is supposed to add tabs with icons to the tabs from the mainAppTabs list:
[["home", getcwd()+"/icons/homeIcon.png"],["log", getcwd()+"/icons/homeIcon.png"],["data", getcwd()+"/icons/homeIcon.png"],["options", getcwd()+"/icons/homeIcon.png"]]
for i,v in enumerate(mainAppTabs):
v.insert(1, Frame(mainAppNotebook, width=850, height=300))
v[1].grid_propagate(False)
icon = PhotoImage(file=v[2])
mainAppNotebook.add(v[1], text = v[0].title(), image = icon, compound = "left")
However, it only adds an icon to the final tab, and the icon it adds is the icon that is meant for the first tab. How can I fix this?