when you specify the width and height, they are not in pixels; they are measured in characters and strings depending on the current font size
that's why when you do Text(self.tk,width=60,height=40) 60 means the text widget is 60 characters wide, and 40 means its height is 40 lines.
this also applies to buttons
this is where the confusion comes from, because it's not in pixels, and if you change the font, it will resize the text widget!
and this is perhaps the best way to control size, at first itโs just confusing, but now that you know it will make more sense!
take a look at this Text Widget Info website and view options for more information.
source share