I'm trying to create an arbitrary number of identical OptionMenus in tkinter using a for loop, however as soon as I select an option in one, all of them are updated. I would like each OptionMenu to act independently of one another while still maintaining the same set of options between each.
Here's my code:
def __initialize_dropdowns(self, length):
default = tk.StringVar()
default.set(" ")
for n in range(length):
dropdown = tk.OptionMenu(self.frame, default, *self.CHARSET)
dropdown.grid(row=0, column=n)
Any help would be appriciated.
