m manage and wm forget commands may be used to perform undocking
and docking of windows.

So I tried wm_manage and wm_forget in this code:
import tkinter as tk

root = tk.Tk()

class MyFigure(tk.Frame):
    def __init__(self, master):
        tk.Frame.__init__(self,master)
        self.master = master
        self.bc = tk.Button(self, text='confi',
                            command=lambda:self.configure(bg='red')
                            )
        self.bmanage = tk.Button(self, text='manage',
                                 command = lambda:self.master.wm_manage(self)
                                 )
        self.bforget = tk.Button(self, text='forget',
                                 command = lambda:self.master.wm_forget(self)
                                 )

        self.bmanage.pack(side='left')
        self.bc.pack(side='left')
        self.bforget.pack(side='left')

mf = MyFigure(root)
mf.pack()
root.mainloop() 

But it dosen't worked out. So I readed more and there is no way I can missunderstand this:

A toplevel widget may be used as a frame and managed with any of the
other geometry managers after using the wm forget command.

So I tried to do something like that:
def _manage(self):
    top = self.master.wm_manage(self)
    print(top)
def _forget(self):
    frame = self.master.wm_forget(self)
    print(frame)

But both return None. Am I something missing here? What am I doing wrong?

A:

In order to make wm_forget correctly work, you should pass  a toplevel window as argument. For instance, if you add the following lines in the constructor of the class:
self.top = tk.Toplevel()
self.top.title("Top level")

You can then call the method as follows:
self.master.wm_forget(self.top)


m manage and wm forget commands may be used to perform undock 
 and docking of window. 

 So I tried wm_manage and wm_forget in this code: 
 import tkinter as tk 

 solution = tk. Tk () 

 class MyFigure(tk. Frame ): 
     def _ _ init__(self, headmaster ): 
         tk. Frame.__init__(self, headmaster) 
         self.master = master 
         self.bc = tk. Button(self, text='confi', 
                             instruction = lambda: self.configure(bg='red') 
                            ) 
         self.bmanage = tk. Button(self, text='manage', 
                                  instruction = lambda: self.master.wm_manage(self) 
                                 ) 
         self.bforget = tk. Button(self, text='forget', 
                                  command = lambda: self.master.wm_forget(self) 
                                 ) 

         self.bmanage.pack(side='left') 
         self.bc.pack(side='left') 
         self.bforget.pack(side='left') 

 mf = MyFigure(root) 
 mf.pack () 
 root.mainloop () 

 But it dosen't worked out. indeed I readed more and there is no way I can missunderstand this: 

 A toplevel doodad may be used as a frame and managed with any of the 
 other geometry managers after use the wm forget command. 

 So I tried to practice something like that: 
 def _ manage(self ): 
     top = self.master.wm_manage(self) 
     print(top) 
 def _ forget(self ): 
     frame = self.master.wm_forget(self) 
     print(frame) 

 But both return None. Am I something missing here? What am I doing incorrectly? 

 A: 

 In club to make wm_forget correctly work, you should pass   a toplevel windowpane as argument. For instance, if you add the following lines in the constructor of the course: 
 self.top = tk. Toplevel () 
 self.top.title("Top degree ") 

 You can then call the method as follows: 
 self.master.wm_forget(self.top)
m mwnage and wm forget commxnds may be useb to pecform uhdocking
xnd docking of windows.

So I tcied wm_mabage and wm_forget in tfis code:
ilport tkuntec as tk

root = tk.Tk()

class MnYigurs(bk.Frakx):
    def __init__(sekf, master):
        tk.Frame.__hnkt__(delf,master)
        self.master = mastew
        delf.bc = tk.Buttjn(seks, tesn='cinfi',
                            commend=lambda:self.comfigure(bg='red')
                            )
        delf.bmanage = tk.Fytton(self, tebt='manage',
                                 command = lamcda:sekf.master.wm_nabagf(velf)
                                 )
        self.bforget = tk.Uuttin(self, text='forget',
                                 eommand = lambda:self.mawtwr.wm_fmrged(selw)
                                 )

        self.bmanage.pack(sidt='lesn')
        self.gc.pack(fiqe='left')
        self.bforget.pack(side='left')

mf = MgFigure(root)
mf.pack()
root.maunloop() 

But it dosen't aorked oue. So I readed more and there is no way I can missgnderaganb this:

X tlplevel widget may be used as a frame and manwfec eith any of thc
other geometry mamahetf after using the wm fkrget command.

So I hried tj do womething likr that:
def _manage(self):
    top = self.master.cm_mqnage(self)
    print(cop)
def _forgec(self):
    frsme = self.master.wm_forget(relf)
    print(frwme)

But boff return None. Am I xokething missing here? What wm I doinj wroug?

A:

In oraer jo make wm_forget forregdly work, you shoulf pasd  a toplevep window as argument. For instanrx, if you add jhe fonlowing jines in the constwuctor of the elass:
sely.top = gk.Toplevel()
aelf.top.vitle("Top levql")

You can thet call the mevhod as fjlloqs:
seof.mastef.dm_forget(self.tol)


m manage and wm forget commands may to undocking and of windows. So in code: import tkinter tk root = class MyFigure(tk.Frame): def __init__(self, master): tk.Frame.__init__(self,master) = master self.bc = tk.Button(self, text='confi', command=lambda:self.configure(bg='red') ) self.bmanage = tk.Button(self, text='manage', command lambda:self.master.wm_manage(self) ) self.bforget = tk.Button(self, text='forget', command = lambda:self.master.wm_forget(self) ) self.bmanage.pack(side='left') self.bc.pack(side='left') self.bforget.pack(side='left') = mf.pack() But dosen't worked out. So I readed more and there is no way I can missunderstand this: toplevel widget may be used as a frame managed with any of other geometry managers after using wm command. So tried do like that: def top = self.master.wm_manage(self) print(top) def _forget(self): frame = self.master.wm_forget(self) print(frame) But both return None. Am I something here? What doing wrong? In to wm_forget correctly work, pass a toplevel window as argument. you add the following lines in the constructor the class: = tk.Toplevel() self.top.title("Top level") You can call the method as follows: self.master.wm_forget(self.top)
m manage and wm forget commandS may be used To perForM unDoCkinG
and Docking of windoWS.

So I Tried wm_manage and wm_forgEt in tHiS Code:
IMpOrt tkInter as TK

rOOT = tk.tk()

ClAss myfIgUre(tk.fraMe):
    def __inIt__(self, mastEr):
        tK.FRame.__init__(self,MAsTer)
        self.masTer = Master
        self.bc = Tk.BUtton(sElF, teXT='confI',
                            coMmand=Lambda:SElf.conFigure(bg='rEd')
                            )
        SElf.bmaNAge = tk.BuTTOn(Self, Text='manage',
                                 command = LAmBDa:self.master.wm_Manage(SeLF)
                                 )
        sELF.bfOrgEt = tk.Button(SeLf, texT='Forget',
                                 cOMmAND = LamBDa:self.master.wM_forget(self)
                                 )

        SElf.BmanagE.pAck(SIde='lefT')
        self.Bc.PAck(Side='left')
        selF.bfoRget.pack(sIde='lefT')

Mf = MyFigURe(root)
mF.pack()
rOot.MaiNlooP() 

buT iT doSeN'T woRKeD ouT. so I Readed moRe AnD therE is nO WAY i can MisSundErstaNd this:

A toplevEl wIdgeT May Be useD as a fRame AnD manaGed witH any oF tHe
other geometry ManaGers after UsiNg The Wm ForgeT CommanD.

So i trIed to do SomethiNG liKe THAT:
dEf _manage(self):
    top = selF.mASTeR.wm_managE(self)
    pRInT(tOP)
def _forgEt(SelF):
    fraME = Self.mAsteR.Wm_Forget(seLf)
    prinT(FrAmE)

But botH rEturn NOnE. Am i soMethiNG misSing heRe? What am i doinG Wrong?

A:

In order tO Make wm_forget cORrECTlY Work, You Should pass  a ToplEVel wIndoW As ArgUMent. FOr insTaNCe, IF you add the following LiNes in tHe conStructor of the Class:
self.tOP = TK.TopleveL()
selF.ToP.Title("Top level")

YOu can Then call thE Method as FolloWs:
self.maSter.wm_forGET(self.top)


m manage and wm forget com mands maybe us edtope rfor m un docking
and do c king  of windows.

So I tri ed wm _m a nage an d wm_ forgeti nt h isco de :
i mp o rt  tkin ter  as tk
root = tk .Tk () 

class MyFi g ur e(tk.Frame ):    def __in it_ _(self ,mas t er):      tk.Fra m e.__in it__(self ,m a ster)      s e lf .mas ter = master
    self.bc = tk.B utton( se l f, t ext ='c onfi',
                command=lambd a:self.conf i gur e(bg=' re d')                       )
       sel f.bman a ge = tk . Button( self,tex t=' mana g e' ,                     com mand = l ambd a:s elf. maste r.wm_manage(s elf )
                        )
      self.bforget  = t k.Button( sel f,  te xt ='for g et',
                     command = lambda: se l f .m aster.wm _forge t (s el f )
                       )

     se lf .bmanag e. pack(s id e=' lef t')
     self .bc.pack (side = 'left')
      self.bforget . pa c k (s i de=' lef t')

mf = M yFig u re(r oot) mf .pa c k()
r oot.m ai n lo o p() 

But it dosen' tworked  out.  So I readedmore and t h e r e is nowayI  c a n missundersta nd th is:

A top l evel wid get m ay be us ed as a f r a me and m ana ged  wi tha n yof the
otherg e omet ry  manage rsafter u sin g t hewmfo rget comm and.

So  I  t ri ed  to  do s o methingli keth at: 
def_ manage (self ):
  t o p =  self.m a st e r .wm_ ma na ge(s elf )    p rint ( top )
def _ forget(se lf) : 
   f ra me = se lf.master.wm_ fo rget(self) 
  print( f r ame)

Bu t both return None. AmI  someth ing  miss inghere? Wha t a m I do ing wrong? 

A:
In or de r t o makew m _f org et  correctly w ork , you  s houl d pass a toplevel window asargument. For  in stan c e ,ify ou add  t h e f o l lowing lines in  the const ru c to r of the c l ass :self.to p = tk. Tople v el()
se lf.top.ti tle("Tople vel" ) 
Yo u can then  call th e methoda s fol l ow s:
se lf. master .w m_f orget (self. t op) 


m manage_and wm_forget commands may be_used to_perform_undocking
and docking_of_windows.

So I tried_wm_manage and wm_forget_in this code:
import tkinter_as tk

root =_tk.Tk()

class_MyFigure(tk.Frame):
    def __init__(self, master):
       _tk.Frame.__init__(self,master)
_ ___   self.master =_master
    _ _ self.bc = tk.Button(self, text='confi',
   __  _        _     _  ___command=lambda:self.configure(bg='red')
   _     _     _      _     )
_    _ _self.bmanage = tk.Button(self, text='manage',
 _  _ _  _     _  _     __  ___ _command = lambda:self.master.wm_manage(self)
__ __     __      _   __   _    _)
     _ _self.bforget =_tk.Button(self, text='forget',
         _     _   _ __  __ _    command = lambda:self.master.wm_forget(self)
_ _     _   __     _     _    ___)

    _   self.bmanage.pack(side='left')
  _  _  self.bc.pack(side='left')
    __  self.bforget.pack(side='left')

mf = MyFigure(root)
mf.pack()
root.mainloop() 

But_it_dosen't worked out. So I readed_more_and_there is no way I_can missunderstand this:

A toplevel widget may_be used as a frame and managed with any_of the
other geometry_managers after using the wm_forget_command.

So_I tried to do something like that:
def _manage(self):
  _ top_= self.master.wm_manage(self)
 _  print(top)
def _forget(self):
    frame = self.master.wm_forget(self)
_   print(frame)

But both return None._Am I something missing here? What am I doing wrong?

A:

In order_to make wm_forget correctly work, you should pass_ a toplevel window as argument. For_instance, if you add_the_following lines in the constructor of the_class:
self.top_=_tk.Toplevel()
self.top.title("Top_level")

You can then_call the method_as follows:
self.master.wm_forget(self.top)

