I'm trying to make the font size change to make the text fit the frame.
My current code:
import tkinter as tk
root = tk.Tk()
text = tk.Text(root, font="Courier", wrap=None)
text.pack(expand=True, fill="both")
text.insert("end", user_input_text)
root.mainloop()
The display text is based off of user input and can be any length.
This method "adjust_font_size" gets called on any keypress within the text widget and adjusts the font size based off the text length. The min and max have been set to 8 and 20 but you can adjust these as needed.