Note that by widget this excludes canvas items (which aren't widgets).
My goal is to build two classes: one that produces items of a canvas widget, the other producing widgets themselves. This is to ensure I can move stuff around in the window and keep it there upon reopening. I've already done this for canvas items. You see, canvas widgets actually return an actual ID that remains constant for the respected items, thus I can reference that and it's coords.
However, for widgets themselves, there seems to be no such way of obtaining an ID. I've tried widget.getint()
, widget.getvar()
, etc. I've also tried repr(widget)
and id(widget)
, but both of these values change upon reopening, am thinking that new widgets are created, where the variable just refers to a newly created widget in comparison to the one just destroyed, even if it has identical properties.
I've also tried putting said widgets in a parent window, like window, or frame, but these widgets themselves do not assign any unique values to their respective child widgets.
So basically, I can obtain unique values of any given widget, but none that are constant. This could by any value by the way, for I shall just turn it to a string, append it to a dict, and assign the coords to said str to reference a specific widget.
Thank you in advance for any guidance, it is much appreciated :)