So I’ve got a Tkinter widget which scrapes a result online. I want it to output a few values to the widget, rather than the Python IDLE console. How would I do that? Would I programmatically/dynamically set a label? Every example I’ve looked up is how to put content initially into an entry widget, which is not what I want.
Like, for example, say you have a widget box
----------
[ ]
[ Search ]
[ ]
[ Output ]
----------
I want, whenever I click search, for the output values to display in the output section.
How would I do that?
Yes, you would set a label in the gui. You can dynamically change the label throughout your code using
text=StringVar. WhereStringVaris a variable you have and when you change the value ofStringVar, it changes the value of the label. Also,StringVarmust be atkinterstringvarobject.