[英]TKinter columnconfigure resize option not working
This is my code to resize a tkinter entry, but it doesnt work.这是我调整 tkinter 条目大小的代码,但它不起作用。 Can someone please help me figure it out?有人可以帮我弄清楚吗? It doesn't resize even though I use columnconfigure and sticky.即使我使用 columnconfigure 和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.必须在包含条目的小部件上调用columnconfigure
和rowconfigure
。 In this case that would be self.columnconfigure(2, weight=1)
.在这种情况下,这将是self.columnconfigure(2, weight=1)
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.