سؤال

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