Closed ohshitgorillas closed 1 month ago
Why are you using method this before configure?
r43_t0int_label = stats_frame.winfo_children()[1]
By doing this you are replacing the ctklabel variable with some other widget, where text is not configurable.
You don't need to add that line, try to make the r43_t0int_label
a global variable.
Yes, this was correct, thank you! Here is the corrected code structure:
def write_stats(stats, stats_frame):
global labels
if not stats_frame.winfo_children():
labels = {}
create_labels(labels, stats_frame)
fill_labels(labels, stats)
where fill_labels(labels, stats)
uses label.configure(text='new text')
I have a label that I am creating in one part of my code:
and I'm trying to update it in another section of my code:
According to the documentation, this is the correct approach, however, I get