문제

since from what I understood in Tkinter the PanedWindow widget is such that what goes inside doesnt have to be packed/gridded, but added to the parent, e.g.

pwin = PanedWindow()
pwin.pack()    
top = Label(pwin, text="top pane")
pwin.add(top)    
bottom = Label(pwin, text="bottom pane")
pwin.add(bottom)

how can I have inside it (pwin) objects that I want to make appear/disappear, since I usually do this by .pack()/.pack_forget() ?

도움이 되었습니까?

해결책

PanedWindow have a forgetmethod accepting a widget as parameter.

In your example, you migh use pwin.forget(bottom).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top