tkinter resizable text with grid
Paulo da Silva
p_s_d_a_s_i_l_v_a_ns at netcabo.pt
Thu Dec 6 02:02:38 EST 2018
Hi!
Does anybody know why this code does not expand the text widget when I
increase the window size (with mouse)? I want height and width but as
minimum (or may be initial) size.
import tkinter as tk
class App:
def __init__(self,master):
self.tboard=tk.Text(master,height=40,width=50)
self.tboard.grid(row=1,column=1,sticky="nsew")
self.tboard.grid_rowconfigure(1,weight=1)
self.tboard.grid_columnconfigure(1,weight=1)
root=tk.Tk()
app=App(root)
root.mainloop()
Thanks
More information about the Python-list
mailing list