Is there any way to dynamically resize a widget's size while resizing a window in tkinter ?
Here's the code:
from tkinter import *
root = Tk()
root.geometry("777x575")
text = Text(root , width = 75 , height = 25)
text.grid(row = 0 , column = 0)
scrollbar = Scrollbar(root , command = text.yview)
scrollbar.grid(row = 0 , column = 1 , sticky = N+S+E+W)
text.config(yscrollcommand = scrollbar.set)
button = Button(root , text = "Sample Button")
button.grid(row = 1 , column = 0 , pady = 20)
mainloop()
when I resize my window, the width and height of the widgets stay the same.
what I want is to dynamically resize the widget's inside my window according to the window's size.
Is there any way to achieve this in tkinter ?
It would be great if anyone could help me out.