I’m using Python and Tkinter, and I need to know the current dimensions (width, height) of a widget.
I’ve tried somewidget["width"], but it returns only a fixed value, and is not updated whenever the widget size changes (e.g. when the window is resized).
Use
somewidget.winfo_width()andsomewidget.winfo_height()to get the actual widget size, thesomewidget['width']property is only a hint given to the geometry manager.