how to insert a widget to another, if they are from different classes. and how to create a universal function of closing the child widgets?
<p>this is my code. I can't put label2 to self.main, and I don't know, how to write a generic function code, that would close the child widgets, that can be specified in the arguments.</p>

<pre><code>import tkinter


class mainwin:
    def __init__(self):
        self.root = tkinter.Tk()
        self.main = tkinter.Canvas(self.root, width=200, height=400)
        self.main.place(x=0, y=0, relwidth=1, relheight=1)
        self.main.config(bg='green')
        self.root.mainloop()


class addlabel:
    def __init__(self):
        self.label2 = tkinter.Label(mainwin.main, height=2, width=50,   text='Hello Noob!!') 
        #can't put on the canvas 'main'
        self.label2.place(x=0, y=50)
        self.exit_button = tkinter.Button(self.label2, text='Exit')
        self.exit.button.bind('&lt;1&gt;', quit_from_widget)

'''
class quit_from_widget:

  def __init__(self):
    # what code should be written here, to quit any child widget.
'''

mainwin()
addlabel()
</code></pre>