title: Trying to put drop down list on a code using Tkinter
body: <p>I'm tring to put some drop down list on a graphic interface I'm building. </p>
  
  <p>I've found the following code for a drop down list, but I'm not able to adapt it to my code.</p>
  
  <pre><code>from Tkinter import *
  
  def print_it(event):
      print var.get()
  
  root = Tk()
  var = StringVar()
  var.set("a")
  OptionMenu(root, var, "a","b","c", command=print_it).pack()
  root.mainloop() 
  </code></pre>
  
  <p>This is my code, it's quite simple what I've done so far. A menu shows up, it asks for how many (n) components does the users want to enter, and it shows n options to entry. The code above shows 'blank' entrys after you put the desired number of components. I want to replace those three blank entrys with three drop down list.</p>
  
  <p>It's marked when I want to put those dropdown lists.</p>
  
  <pre><code>from Tkinter import *
  import Image
  import ImageTk
  import tkFileDialog
  
  class Planificador:
      def __init__(self,master):
          master.title("Planificador")
          self.frameOne = Frame(master)
          self.frameOne.grid(row=0,column=0)
  
          # Logo
          self.imgLabel = Label(self.frameOne, image = None)
          self.imgLabel.grid(row=0,column=0)
          self.img = ImageTk.PhotoImage(file = "logo.png")
          self.imgLabel["image"] = self.img
  
          self.botones()
  
      def botones(self):
          self.piezastext = Label(self.frameOne, text = " number of components ", justify="center")
          self.piezastext.grid(row=1, column=0)
          self.entrypiezas = Entry(self.frameOne,width=5)
          self.entrypiezas.grid(row=2, column=0)
          self.aceptarnumpiezas = Button(self.frameOne,text="Aceptar", command=self.aceptar_piezas,width=8)
          self.aceptarnumpiezas.grid(row=6, column=0)
  
  
      def aceptar_piezas(self):
          num_piezas = self.entrypiezas.get()
          print num_piezas
  
          self.piezastext.grid_remove()
          self.entrypiezas.grid_remove()
          self.aceptarnumpiezas.grid_remove()
  
          n = 1;
          while n &lt;= int(num_piezas):
              self.textopieza = Label(self.frameOne, text = "Pieza", justify="left")
              self.textopieza.grid(row=n, column=0)
  
                      // INSTEAD THESE 'n' BLANK ENTRYS, I WANT TO PUT 'n' DROP DOWN LISTS
              self.entrypiezas = Entry(self.frameOne,width=5)
              self.entrypiezas.grid(row=n, column=1)
  
              self.aceptarpiezas = Button(self.frameOne,text="Aceptar",width=8)
              self.aceptarpiezas.grid(row=int(num_piezas)+1, column=0)
  
              n += 1
  
  
  # Main
  if __name__ == "__main__":
      # create interfacE
      root = Tk()
      movieApp = Planificador(root)
      root.mainloop()
  </code></pre>
  
  <p>So I want to know how can I put that drop down list on a given frame, <code>frameOne</code>in my case, instead of a full window. Thanks in advance.</p>