title: Python tkinter Label set method with textvariable launched from another window
body: <p>I'm having a weird issue with a textvariable reference in tkinter and I can't find a way to formulate a clean question so that I can find an answer instead of asking.  </p>
  
  <p>In the code below, if I call <code>PromptTradeAlloc(ref=4, sym="AAPL")</code> the labels (inside a LabelFrame) will set perfectly as instructed.</p>
  
  <p><a href="https://i.stack.imgur.com/TUXlq.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TUXlq.jpg" alt="enter image description here"></a></p>
  
  <p>However, if I call the previous class from <code>PromptTradesLog()</code> select the line in the Listbox and then click 'Open Trade' the Labels set method does not seem to work.</p>
  
  <p><a href="https://i.stack.imgur.com/0ySNG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0ySNG.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/k3NzQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k3NzQ.jpg" alt="enter image description here"></a></p>
  
  <p>Any help would be much appreciated.</p>
  
  <pre><code>from tkinter import *
  
  class PromptTradesLog:
      def __init__(self):
          super().__init__()
          self.root = Tk()
          self.root.minsize(400, 250)
          self.root.title('Last 10 Trades')
          self.root.wm_attributes('-topmost', 1)
          self.t = Listbox(self.root, width=50)
  
          Button(self.root, text="Delete", command=self.delete_command).grid(column=0, row=12, padx=(10, 2), sticky=N)
          Button(self.root, text="Open Trade", command=self.open_trade).grid(column=1, row=12, padx=(10, 2), sticky=N)
          Button(self.root, text="Commit", command=self.commit_command).grid(column=2, row=12, padx=(10, 2), sticky=N)
          self.t.insert(END, "THIS IS A TEST")
          self.t.grid(column=0, row=1, columnspan=15, rowspan=10, padx=10, pady=(0, 10))
  
          self.root.mainloop()
  
  
      def delete_command(self):
          pass
  
      def open_trade(self):
          """
          open a trade to make some modifications
          Calls PromptTradeAlloc which opens a new window with different features
          """
          PromptTradeAlloc(ref=4, sym="AAPL")
  
      def commit_command(self):
          pass
  
  
  class PromptTradeAlloc:
      def __init__(self, ref, sym):
          super().__init__()
          self.root = Tk()
          self.root.minsize(200, 100)
          self.root.title(f'Trade #{ref} for {sym}')
          self.root.wm_attributes('-topmost', 1)
          self.t = Listbox(self.root, width=15,  height=15)
          self.ref = ref
  
          self.t.grid(column=0, row=1, columnspan=15, rowspan=50, padx=10, pady=(1, 10))
  
          self.t.bind('&lt;Double-Button-1&gt;', self.populate)
  
          info = LabelFrame(self.root, text=sym)
          ff = Frame(self.root)
  
          # set the textvariable as StringVar
          # these are set in the self.reload_list() function
          self.total_amt = StringVar()
          self.total_qty = StringVar()
          Label(info, textvariable=self.total_amt, justify=LEFT).grid(row=0, column=0, rowspan=2, padx=2)
          Label(info, textvariable=self.total_qty, justify=LEFT).grid(row=0, column=1, rowspan=2, padx=2)
  
          Label(ff, text="Fond", width=10).grid(row=2, column=0)
          self.fond_lbl = StringVar()
          Label(ff,
                textvariable=self.fond_lbl,
                relief='solid',
                borderwidth=1,
                width=10).grid(row=3, column=0)
  
          Label(ff, text="Qty", width=10).grid(row=2, column=1)
          self.qty_entry = Entry(ff, width=10)
          self.qty_entry.grid(row=3, column=1)
  
          Label(ff, text="New Fond", width=10).grid(row=2, column=2)
          self.fond_entry = Entry(ff, width=10)
          self.fond_entry.grid(row=3, column=2)
  
          Button(ff, text="Delete", command=self.delete_command).grid(row=4, column=0, pady=4)
          Button(ff, text="Update", command=self.update_command).grid(row=4, column=1, pady=4)
          Button(ff, text="Add", command=self.add_command).grid(row=4, column=2, pady=4)
  
          info.grid(row=1, column=18, rowspan=2, columnspan=3)
          ff.grid(row=3, column=18, columnspan=3)
  
          self.reload_list()
  
          self.root.mainloop()
  
      def populate(self, event):
          pass
  
      def spaces(self, symbol, lmt):
          l = len(symbol)
          return f"{symbol}{(lmt-l)*' '}"
  
      def reload_list(self):
          self.t.insert(END, "This is another test")
  
          self.t.config(font=('Courier', "11"))
  
          # this is where I set the textvariable strings
          self.total_amt.set("Total Amt:\nSET 1")
          self.total_qty.set(f"Total Qty:\nSET 2")
  
          self.root.update()
  
      def delete_command(self):
          pass
  
      def update_command(self):
          pass
  
      def add_command(self):
          pass
  
  # PromptTradesLog()
  # PromptTradeAlloc(ref=4, sym="AAPL")
  </code></pre>