I made this program where I am putting labels on a grid without saving them in a variable. I do this because then I can for loop through a list of classes and get the data from each class in and add them to a row. This is a small piece of it:
self.collum = 0
for i in self.gui_resource_list:Label(text=i.get_name(), relief="groove", width=15).grid(column=self.column, row=0)Label(text=i.get_buyPrice(), relief="groove", width=15).grid(column=self.column, row=1)Label(text=i.get_salePrice(), relief="groove", width=15).grid(column=self.column, row=2)Label(text=i.arrow, relief="groove", width=15).grid(column=self.column,row=3)self.column += 1
So this will generate a table-like layout. Then there is a button that updates all the values runs that for loop again. So it basically draws the new labels on top of the older ones. This is not good because when you are on the turn 300 there are 300 labels times the all the resource instances in gui_resource
list. A way to fix this is to delete the old labels.
Is there a way to delete an unsaved label? Something like:
delete_grid(column=2,row=3)
And that would delete all of the things in the grid at position 2,3?