title: tkinter : how to call a method of a child from another child
body: <p>It is the first time that i use pyhton to create a graphical interface and i have difficulties to understand the link between the parent and the children. </p>
  
  <p>I first create the root window in a separated thread :</p>
  
  <pre><code>import tkinter as tk
  import threading as th
  
  class GUI(th.Thread):
      def __init__(self):
          th.Thread.__init__(self)
          self.root = tk.Tk()
          self.gp = MainFrame(self.root)
  
      def start(self):
          self.root.mainloop()
  
      def stop(self):
          self.root.destroy()
  </code></pre>
  
  <p>The constructor of this class calls the constructor of the main frame :</p>
  
  <pre><code>class MainFrame(tk.Frame):
      def __init__(self,parent):
          tk.Frame.__init__(self,parent)
          self.x=my_label(self)
          self.up=my_update(self)
          self.grid()
  </code></pre>
  
  <p>In this main frame, I have only two simple elements, their class is :</p>
  
  <pre><code>class my_label(tk.Frame):
      def __init__(self,parent):
          tk.Frame.__init__(self,parent)
          self.l = tk.Label(self,text="some text")
          self.l.grid()
          self.grid()
  
  class my_update(tk.Frame):
      def __init__(self,parent):
          tk.Frame.__init__(self,parent)
  
          self.b=tk.Button(self,text="update",command=self.ButtonPushed)
          self.b.grid()
          self.grid()
  
      def ButtonPushed(self):
          # here is my problem...
  </code></pre>
  
  <p>Doing this works, but when I click on the update button I want to modify <code>x</code> (in the <code>MainFrame</code>). In other words, I want to modify, from a child, one of the other parent's children... how can i do that ?</p>
  
  <p>Side question : does the general construction of my graphical interface seem correct ? I mean, is it correct to let <code>my_update</code> and <code>my_label</code> inherit from <code>tk.Frame</code> ?</p>