简体   繁体   中英

TKinter columnconfigure resize option not working

This is my code to resize a tkinter entry, but it doesnt work. Can someone please help me figure it out? It doesn't resize even though I use columnconfigure and sticky. My code is below

self.ScriptEntry = tk.Entry(self,textvariable=self.FileText) 
self.ScriptEntry.grid(column=2,row=0, columnspan=2, sticky = W+E) 
self.ScriptEntry.columnconfigure(2, weight = 1)

columnconfigure and rowconfigure must be called on the widget that contains the entry. In this case that would be self.columnconfigure(2, weight=1) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM