title: Prompt user for input if item on drop-down list is selected in Python
body: <p>I have a GUI in python that, amongst other things, let's the user choose items from a dropdown menu (I used the combobox feature from tkinter). </p>
  
  <p>I wish to have it so that when the item "Custom" is select, an input box appears to ask the user what their custom number would be. I don't want to have to use a button for the box to appear, but somehow have it so that as soon as custom is selected, the input box appears. I tried first with while loops but I can't get it to work, same with if statements :s</p>
  
  <p>I also tried using the askinteger() method that I found here (<a href="http://effbot.org/tkinterbook/tkinter-entry-dialogs.htm" rel="nofollow noreferrer">http://effbot.org/tkinterbook/tkinter-entry-dialogs.htm</a>) but none of the combinations I came up with worked (I am very new at Python and am still learning so excuse my obvious mistakes).</p>
  
  <p>Here is my code for the GUI :</p>
  
  <pre><code>from tkinter import *
  from tkinter.ttk import *
  from tkinter import filedialog
  from tkinter import StringVar
  from tkinter import messagebox
  from tkinter import simpledialog
  
  
  class MyGUI:
      def __init__(self, master):
  
          self.master = master
          master.title("Intent/Interpretation Check")
  
          self.runlabel = Label(master, text="RunID :")
          self.runlabel.grid(row=0, column=0)
  
          self.runentry = Entry(master)
          self.runentry.grid(row=1, column=0, padx=25)
  
          self.checklabel = Label(master, text="Check type :")
          self.checklabel.grid(row=0, column=1)
  
          self.typeselect = Combobox(master)
          self.typeselect['values']=("Intent Score", "Interpretation Score")      
          self.typeselect.grid(row=1, column=1, padx=25)
  
          self.limitlabel = Label(master, text="Fails if score is below :")
          self.limitlabel.grid(row=0, column=2, padx=25)
  
          self.limitselect = Combobox(master)
          self.limitselect['values']=(1000, 5000, "Custom")       
          self.limitselect.grid(row=1, column=2, padx=25)
          if self.limitselect.get() != "Custom":
              self.limit = self.limitselect.get()
              pass
          else:
              self.askinteger("Custom limit", "Please enter a number from 1 to 10000", minvalue=1, maxvalue=10000)
  
          self.submitbutton = Button(master, text="Submit", command=self.checkstatus)
          self.submitbutton.grid(row=1, column=3, padx=25, pady=5)
  
  root = Tk()
  root.geometry("+600+300")
  my_gui = MyGUI(root)
  root.mainloop()
  </code></pre>
  
  <p>Thank you very much in advance !</p>