title: How do you use .get() with a multiframe shopping cart in python tkinter?
body: <p>In this code. I want display the information from the frame I hit the Buy button on. I'm sure it is a simple solution but it has eluded me. I've been going through google and stack overflow with no solution yet.</p>
  <p>I tried making the NewFrame global but that just does the last one made.</p>
  <pre><code>from tkinter import *
  
  root = Tk()
  
  
  FrameNum = 1
  ItemCount = 1
  
  def combine_funcs(*funcs):
  
      def combined_func(*args, **kwargs):
          for f in funcs:
              f(*args, **kwargs)
  
      return combined_func
  
  
  def place_order():
  
      global ItemCount
  
      Product = Product_Box.get()
  
      Label(root, text=&quot;Your Purchase of &quot; + str(Product) + &quot; Placed&quot;).grid(row=1, column=3, stick=&quot;w&quot;)
      ItemCount += 1
  
  
  def create_frame():
  
      global FrameNum
  
      NewFrame = LabelFrame(root,name=(&quot;newframe&quot;+str(FrameNum)), text=(&quot;Item &quot;+str(FrameNum)),width=100, height=100)
      NewFrame.grid(row=FrameNum, column=0)
  
      Product_Lab = Label(NewFrame, text=&quot;Product&quot;).grid(row=0, column=0)
  
      Qty_Lab = Label(NewFrame, text=&quot;Qty&quot;).grid(row=0, column=1)
  
      Price_Lab = Label(NewFrame, text=&quot;Price&quot;).grid(row=0, column=2)
  
  
      # Entry Boxes
  
      Product_Box = Entry(NewFrame, width=10).grid(row=1, column=0)
  
      Qty_Box = Entry(NewFrame, width=12).grid(row=1, column=1)
  
      Price_box = Entry(NewFrame, width=6).grid(row=1, column=2)
  
  
  
      Remove_Bet_Button = Button(NewFrame, text=&quot;Del&quot;, command=NewFrame.destroy).grid(row=3, column=2)
  
      Buy_Button = Button(NewFrame, text=&quot;Buy&quot;, command=combine_funcs(place_order, NewFrame.destroy)).grid(row=3, column=0)
  
      FrameNum += 1
  
  
  framebutton = Button(root, text=&quot;Frame&quot;, command=create_frame).grid(row=0, column = 3, stick =&quot;n&quot;)
  
  
  root.mainloop()
  </code></pre>
  <p>I get this error when hitting the Buy button. (with or without information entered into the boxes from that frame)</p>
  <pre><code>NameError: name 'Product_Box' is not defined
  
  </code></pre>