嗨,即使有小部件,有没有办法改变小部件的宽度和高度?我有这样的代码
form = Tk()
form.geometry("500x500")
def click():
global frame
frame.config(height = 0 ,width = 0)
frame = LabelFrame(form , text = "vaaja")
frame.place(x = 20 , y = 30)
Label(frame, text ="1").grid(row = 0,column = 0 )
Label(frame, text = "2").grid(row = 1 ,column = 0 )
Button(form , text="Click", command = click).place(x = 200 , y = 200)
form.mainloop()
当我单击按钮时,框架的大小是相同的(我不能使用 grid_forget() 作为标签,然后更改框架的大小)