title: How to make a combobox that binds different methods in python
body: <p>I want to create multiple combo boxes that have entries in them that will trigger different bind events. For example:
  Combobox1 = {Mustang, Focus, Tesla} , mustang would have a bind to run method_mustang, focus would have a bind to run the method_focus etc.. all methods that will be created will trigger a different event</p>
  
  <p>Then I want to be able to write a new combo box for trucks that would do something similar. I can successfully create my combobox with the listed items, but I am stuck on how to bind the different items to another method.</p>
  
  <p>Please help.</p>
  
  <p>using code posted in another question: ( no need for the label section but wanted to give something as a reference) </p>
  
  <pre><code>import tkinter as tk
  from tkinter import ttk
  
  values = ['mustang', 'focus', 'tesla']
  root = tk.Tk()
  labels = dict((value, tk.Label(root, text=value)) for value in values)
  
  def handler(event):
      current = combobox.current()
      if current != -1:
          for label in labels.values():
              label.config(relief='flat')
          value = values[current]
          label = labels[value]
          label.config(relief='raised')
  
  combobox = ttk.Combobox(root, values=values)
  combobox.bind('&lt;&lt;ComboboxSelected&gt;&gt;', handler)
  combobox.pack()
  for value in labels:
      labels[value].pack()
  
  root.mainloop()
  </code></pre>